Skip to content

Commit

Permalink
fix(rn): login email
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jan 17, 2025
1 parent 7169ff6 commit 8a1ff73
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions apps/mobile/src/modules/login/email.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { useMutation } from "@tanstack/react-query"
import { router } from "expo-router"
import { useEffect } from "react"
import type { Control } from "react-hook-form"
import { useController, useForm } from "react-hook-form"
Expand All @@ -19,7 +18,6 @@ import { z } from "zod"
import { ReAnimatedPressable } from "@/src/components/common/AnimatedComponents"
import { ThemedText } from "@/src/components/common/ThemedText"
import { signIn } from "@/src/lib/auth"
import { setSessionToken } from "@/src/lib/cookie"
import { toast } from "@/src/lib/toast"
import { accentColor, useColor } from "@/src/theme/colors"

Expand All @@ -36,14 +34,6 @@ async function onSubmit(values: FormValue) {
email: values.email,
password: values.password,
})
.then((user) => {
if (!user.data) {
toast.error("Login failed")
return
}
setSessionToken(user.data.token)
router.push("/(stack)/(tabs)")
})
.catch((error) => {
console.error(error)
toast.error("Login failed")
Expand Down

0 comments on commit 8a1ff73

Please sign in to comment.