From 1c9bb5e817f04c4241cc9249dec5bcdc936a1c83 Mon Sep 17 00:00:00 2001 From: Adam Cohen Hillel Date: Fri, 18 Apr 2025 01:12:14 +0100 Subject: [PATCH] try this2 --- .../app/dashboard/(personalAccount)/page.tsx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/dashboard/(personalAccount)/page.tsx b/frontend/src/app/dashboard/(personalAccount)/page.tsx index 29ec447c..edd7fb81 100644 --- a/frontend/src/app/dashboard/(personalAccount)/page.tsx +++ b/frontend/src/app/dashboard/(personalAccount)/page.tsx @@ -1,7 +1,4 @@ -'use client'; - -import { useEffect } from 'react'; -import { useRouter } from 'next/navigation'; +import { redirect } from 'next/navigation'; // Set all dynamic options to prevent prerendering // export const dynamic = 'force-dynamic'; @@ -11,17 +8,5 @@ import { useRouter } from 'next/navigation'; // export const runtime = 'edge'; export default function PersonalAccountPage() { - const router = useRouter(); - - // Use client-side navigation instead of server redirect - useEffect(() => { - router.replace('/dashboard'); - }, [router]); - - // Return a minimal loading state until redirect happens - return ( -
-
-
- ); + redirect('/dashboard'); } \ No newline at end of file