Skip to content

Commit

Permalink
Reorder Command Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemarcoli committed Oct 7, 2023
1 parent 9f9df17 commit 98401b3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions components/command-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ export function CommandMenu() {
<span>Quiz List</span>
</CommandItem>
</CommandGroup>
<CommandGroup heading="User">
{!session && <CommandItem onSelect={() => signIn()}>
<LogIn className="mr-2 h-4 w-4"></LogIn>
<span>Sign In</span>
</CommandItem>}
{session && <CommandItem onSelect={() => signOut()}>
<LogOut className="mr-2 h-4 w-4"></LogOut>
<span>Sign Out</span>
</CommandItem>}
</CommandGroup>
<CommandGroup heading="Quizzes">
{quizzes.map((quiz) => (
<CommandItem key={quiz.id} onSelect={() => navigate(`/quiz/${quiz.id}`)}>
Expand All @@ -103,16 +113,6 @@ export function CommandMenu() {
{/* <CommandShortcut>⌘S</CommandShortcut>*/}
{/*</CommandItem>*/}
</CommandGroup>
<CommandGroup heading="User">
{!session && <CommandItem onSelect={() => signIn()}>
<LogIn className="mr-2 h-4 w-4"></LogIn>
<span>Sign In</span>
</CommandItem>}
{session && <CommandItem onSelect={() => signOut()}>
<LogOut className="mr-2 h-4 w-4"></LogOut>
<span>Sign Out</span>
</CommandItem>}
</CommandGroup>
</CommandList>
</CommandDialog>
)
Expand Down

0 comments on commit 98401b3

Please sign in to comment.