diff --git a/src/components/auth/DashboardContent.tsx b/src/components/auth/DashboardContent.tsx index 7fba7d3..9f5dc81 100644 --- a/src/components/auth/DashboardContent.tsx +++ b/src/components/auth/DashboardContent.tsx @@ -24,21 +24,16 @@ export default function DashboardContent() { const [loading, setLoading] = useState(true); useEffect(() => { - const checkAuth = async () => { + const fetchUser = async () => { const supabase = createClient(); const { data: { user } } = await supabase.auth.getUser(); - if (!user) { - router.push(`/${locale}/login`); - return; - } - setUser(user); setLoading(false); }; - checkAuth(); - }, [locale, router]); + fetchUser(); + }, []); const handleLogout = async () => { const supabase = createClient();