diff --git a/app/frontend/src/pages/Groups/Create/index.tsx b/app/frontend/src/pages/Groups/Create/index.tsx index b5da30f1..b61f8632 100644 --- a/app/frontend/src/pages/Groups/Create/index.tsx +++ b/app/frontend/src/pages/Groups/Create/index.tsx @@ -1,4 +1,4 @@ -import { useForm } from 'react-hook-form'; +import { useController, useForm } from 'react-hook-form'; import { TextLabel, Button } from '@morak/ui'; @@ -22,13 +22,27 @@ export function GroupCreatePage() { mode: 'all', }); + const { + field: { value: nameValue, onChange: onChangeName }, + } = useController({ + name: 'name', + control, + rules: { + required: true, + }, + }); return (
console.log(data))} > - +