1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

added toasts

This commit is contained in:
Fedor Katurov 2022-01-04 21:10:05 +07:00
parent ef959af711
commit 39e801f6f3
10 changed files with 92 additions and 7 deletions

View file

@ -8,14 +8,13 @@ import { showErrorToast } from '~/utils/errors/showToast';
const validationSchema = object().shape({});
const afterSubmit = ({ resetForm, setStatus, setSubmitting, setErrors }: FormikHelpers<INode>) => (
const afterSubmit = ({ resetForm, setSubmitting, setErrors }: FormikHelpers<INode>) => (
e?: string,
errors?: Record<string, string>
) => {
setSubmitting(false);
if (e) {
setStatus(e);
showErrorToast(e);
return;
}