Skip to content

Commit 0356a51

Browse files
bug: fixed login button
1 parent b765845 commit 0356a51

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

components/navbar/navbar-routes.tsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,26 @@ export const NavBarRoutes = ({ globalProgress, userNotifications }: NavBarRoutes
5555
<Skeleton className="h-10 w-10 rounded-full" />
5656
</div>
5757
)}
58-
{!isLoading && user?.userId && (
58+
{!isLoading && (
5959
<div className="flex gap-x-2 ml-auto items-center">
60-
<>
61-
{(isCoursePage ||
62-
isStudentPage ||
63-
isTeacherPage ||
64-
isChatPage ||
65-
isSettingsPage ||
66-
isOwnerPage) && (
67-
<Link href="/">
68-
<Button size="sm" variant="ghost">
69-
<LogOut className="h-4 w-4 mr-2" />
70-
{isTeacherPage || isOwnerPage || isChatPage ? 'Exit' : 'Back to courses'}
71-
</Button>
72-
</Link>
73-
)}
74-
<Notifications userNotifications={userNotifications} />
75-
</>
60+
{user?.userId && (
61+
<>
62+
{(isCoursePage ||
63+
isStudentPage ||
64+
isTeacherPage ||
65+
isChatPage ||
66+
isSettingsPage ||
67+
isOwnerPage) && (
68+
<Link href="/">
69+
<Button size="sm" variant="ghost">
70+
<LogOut className="h-4 w-4 mr-2" />
71+
{isTeacherPage || isOwnerPage || isChatPage ? 'Exit' : 'Back to courses'}
72+
</Button>
73+
</Link>
74+
)}
75+
<Notifications userNotifications={userNotifications} />
76+
</>
77+
)}
7678
<UserProfileButton globalProgress={globalProgress} />
7779
</div>
7880
)}

0 commit comments

Comments
 (0)