updates
This commit is contained in:
@@ -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("/")
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user