diff --git a/apps/saru/app/page.tsx b/apps/saru/app/page.tsx index 296b92ca..6a1144b4 100644 --- a/apps/saru/app/page.tsx +++ b/apps/saru/app/page.tsx @@ -20,7 +20,9 @@ const crimson = Crimson_Text({ export default function Home() { const router = useRouter(); - const [hasSession, setHasSession] = useState(false); + + const { data: session } = authClient.useSession(); + const hasSession = !!session?.user; const [starGoal, setStarGoal] = useState(0); const { count: animatedStarCount } = useCounter(starGoal); @@ -36,26 +38,6 @@ export default function Home() { .catch(() => {}); }, []); - useEffect(() => { - const checkSession = async () => { - try { - const { data: session, error } = await authClient.getSession(); - if (error) { - console.error("Error fetching session:", error); - return; - } - - const isLoggedIn = !!session?.user; - setHasSession(isLoggedIn); - - } catch (error) { - console.error("Error checking session unexpectedly:", error); - } - }; - - checkSession(); - }, [router]); - const handleBeginClick = () => { if (hasSession) { router.push("/documents"); @@ -143,9 +125,8 @@ export default function Home() { {/* Social Proof */}
-
-
Used by
-
+
+ Used by
Vercel logo
-
- -
- - Lee Robinson - @leerob - VP DX, Cursor - - - - David Singleton - @dps - ex-CTO, Stripe - -
+ +
+ + Lee Robinson + @leerob + VP DX, Cursor + + + + David Singleton + @dps + ex-CTO, Stripe +
+
@@ -251,7 +231,7 @@ export default function Home() { height={48} className="size-12 rounded-full object-cover" /> -
+
“I went in expecting slop, but it's actually good. The app looked so good, and it looks legitimately useful.”