switch to handle submit

This commit is contained in:
Brandon Egger
2023-09-04 00:25:10 -05:00
parent cd1dc2a555
commit f7144e7cf4
3 changed files with 18 additions and 10 deletions

View File

@ -1,6 +1,6 @@
import { XCircleIcon, PlusCircleIcon } from "@heroicons/react/20/solid";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { useState } from "react";
import {
type SubmitHandler,
useForm,
@ -45,6 +45,11 @@ const EditResourcePage = () => {
key="create"
symbol={<PlusCircleIcon className="w-4" />}
label="Create"
onClick={() => {
formMethods
.handleSubmit(onSubmit)()
.catch((error) => console.error(error));
}}
/>,
<AdminActionLink
key="cancel"