diff --git a/src/App.tsx b/src/App.tsx index df26687..3c9cf87 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,6 +25,7 @@ import User from '@pages/BranchManager/Users'; import UserAdd from '@pages/BranchManager/Users/AddUser'; import UserEdit from '@pages/BranchManager/Users/EditUser'; import EditFoods from '@pages/BranchManager/Foods/EditFood'; +import AddCategories from '@pages/BranchManager/Categories/AddCategories'; const routes = createRoutesFromElements( @@ -107,6 +108,15 @@ const routes = createRoutesFromElements( } /> + + + + + } + /> ; + +function CategoryForm() { + const Navigate = useNavigate(); + const { register, handleSubmit, formState } = useForm({ + resolver: zodResolver(FormSchema), + }); + + const { errors } = formState; + + useEffect(() => { + if (Object.keys(errors).length) { + console.log('Form errors:', errors); + } + }, [errors]); + + const onSubmit: SubmitHandler = async (data) => { + console.log('Form data:', data); + }; + + return ( +
+
+
+

+ Add Food Categories +

+
+
+
+
+ +