Skip to content

Commit

Permalink
fix navbar jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
Opeyem1a committed Sep 2, 2024
1 parent d0ecb70 commit 32541ef
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ const Navbar = () => {
<Logo />
<div className="flex gap-2">
<NavigationMenuList className="flex justify-between">
<NavigationMenuItem>
<NavigationMenuLink
href={`/course/${courseId}/setup`}
className={navigationMenuTriggerStyle()}
>
Onboarding
</NavigationMenuLink>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink
href={`/course/${courseId}/students`}
Expand All @@ -46,20 +54,24 @@ const Navbar = () => {
</NavigationMenuLink>
</NavigationMenuItem>
</NavigationMenuList>
{authUser && (
<DropdownMenu>
<DropdownMenuTrigger>
<DropdownMenu>
<DropdownMenuTrigger>
{authUser ? (
<Avatar>
<AvatarFallback>
{authUser.username[0].toUpperCase()}
</AvatarFallback>
</Avatar>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem onClick={logoutSync}>Logout</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)}
) : (
<Avatar className="animate-pulse">
<AvatarFallback></AvatarFallback>
</Avatar>
)}
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem onClick={logoutSync}>Logout</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
</NavigationMenu>
)
Expand Down

0 comments on commit 32541ef

Please sign in to comment.