Skip to content

Commit 7968daa

Browse files
committed
Modified profile page for routing
1 parent 2e50f1c commit 7968daa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

myhaki/src/app/profile/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export default function ProfilePage() {
3636
useEffect(() => {
3737
const userId = localStorage.getItem('userId');
3838
if (!userId) {
39-
setError('User not logged in');
40-
setLoading(false);
39+
router.push('/authentication/sign-in');
40+
setSuccessMessage(null);
4141
return;
4242
}
4343
fetchUserById(userId)

0 commit comments

Comments
 (0)