feat(frontend): updated to show error toasts for create network modal

pull/86/head
Samuel Rowe 3 years ago
parent bb9baa6bb0
commit 1672bb9210

@ -6,6 +6,7 @@ import { CallbackFunction } from "../../../types";
import { getInitialValues, tabs, validationSchema } from "./form-utils"; import { getInitialValues, tabs, validationSchema } from "./form-utils";
import { classNames } from "../../../utils/styles"; import { classNames } from "../../../utils/styles";
import { Button, styled } from "@mui/joy"; import { Button, styled } from "@mui/joy";
import { reportErrorsAndSubmit } from "../../../utils/forms";
interface ICreateNetworkModalProps { interface ICreateNetworkModalProps {
onCreateNetwork: CallbackFunction; onCreateNetwork: CallbackFunction;
@ -69,7 +70,11 @@ const CreateNetworkModal: FunctionComponent<ICreateNetworkModalProps> = (
</div> </div>
<Actions> <Actions>
<Button size="sm" variant="solid" onClick={formik.submitForm}> <Button
size="sm"
variant="solid"
onClick={reportErrorsAndSubmit(formik)}
>
Create Create
</Button> </Button>
</Actions> </Actions>

Loading…
Cancel
Save