diff options
Diffstat (limited to 'client/src/components/AdminLogin.tsx')
-rw-r--r-- | client/src/components/AdminLogin.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/components/AdminLogin.tsx b/client/src/components/AdminLogin.tsx index 92e5335..4f53566 100644 --- a/client/src/components/AdminLogin.tsx +++ b/client/src/components/AdminLogin.tsx @@ -5,7 +5,7 @@ import { Button, Paper, TextField, Typography } from '@mui/material'; import { useForm } from 'react-hook-form'; import { setAdmin } from '../slices/auth/adminSlice'; import { useLoginAdminMutation } from '../slices/api/adminSlice'; -import type { AdminLoginRequest } from '../models'; +import type { Credentials } from '../models'; function GuestLogin() { const dispatch = useDispatch(); @@ -16,14 +16,14 @@ function GuestLogin() { register, handleSubmit, formState: { errors }, - } = useForm<AdminLoginRequest>({ + } = useForm<Credentials>({ defaultValues: { username: '', password: '', }, }); - const onSubmit = async (data: AdminLoginRequest) => { + const onSubmit = async (data: Credentials) => { try { dispatch(setAdmin(await login(data).unwrap())); navigate('/dashboard'); |