From 35018e4b883076867f46136b4209abd2a85f0a6d Mon Sep 17 00:00:00 2001 From: kibin Date: Wed, 1 Apr 2026 09:18:35 +0000 Subject: [PATCH] fix: use useAuthStore instead of useAuth in profile page --- app/(app)/profile/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(app)/profile/page.tsx b/app/(app)/profile/page.tsx index 9e3942f..0ae4bab 100644 --- a/app/(app)/profile/page.tsx +++ b/app/(app)/profile/page.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { useMutation } from "@tanstack/react-query"; -import { useAuth } from "@/contexts/AuthContext"; +import { useAuthStore } from "@/lib/auth-store"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card"; import { Button } from "@/components/ui/Button"; import { Input } from "@/components/ui/Input"; @@ -11,7 +11,7 @@ import api from "@/lib/api"; import { toast } from "sonner"; export default function ProfilePage() { - const { user } = useAuth(); + const user = useAuthStore((s) => s.user); const [infoForm, setInfoForm] = useState({ firstName: (user as any)?.firstName ?? user?.name?.split(" ")[0] ?? "",