This commit is contained in:
2026-04-07 14:45:29 +03:00
parent c47f7c1b6a
commit 38ef10da4d
11 changed files with 1006 additions and 13 deletions
+3 -3
View File
@@ -55,9 +55,9 @@ export function LoginForm({
const { mutate, error, isPending: isSubmitting } = useMutation({
mutationFn: (values: LoginFormValues) => api.auth.login(values),
onSuccess: async (data) => {
if (data.data?.token && data.data?.user) {
await login(data.data.token, data.data.user as Parameters<typeof login>[1])
onSuccess: async (data:any) => {
if (data.token && data.user) {
await login(data.token, data.user as Parameters<typeof login>[1])
router.push("/")
}
},