Skip to content

Commit 6cd053c

Browse files
author
Hanzo Dev
committed
fix: Fix React hooks error in dashboard page
1 parent 630fafb commit 6cd053c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

app/dashboard/page.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default function DashboardPage() {
2020
}
2121
}, [user, loading, router]);
2222

23+
// Render loading state
2324
if (loading) {
2425
return (
2526
<div className="min-h-screen flex items-center justify-center">
@@ -31,8 +32,16 @@ export default function DashboardPage() {
3132
);
3233
}
3334

35+
// Render nothing while redirecting
3436
if (!user) {
35-
return null;
37+
return (
38+
<div className="min-h-screen flex items-center justify-center">
39+
<div className="text-center">
40+
<HanzoLogo className="w-12 h-12 mx-auto mb-4 animate-pulse" />
41+
<p className="text-gray-500">Redirecting to login...</p>
42+
</div>
43+
</div>
44+
);
3645
}
3746

3847
return (

0 commit comments

Comments
 (0)