Skip to content

Commit

Permalink
only show user links if logged in on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
danreeves committed Oct 9, 2023
1 parent e3e03b4 commit c01c000
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,19 @@ export default function Layout({ user }: { user: User | null }) {
{item.name}
</NavLink>
))}
<div className="md:hidden">
{userNavigation.map((item) => (
<NavLink
key={item.href}
to={item.href}
className="aria-[current=page]:text-foreground text-foreground/60 block rounded-md px-3 py-2 text-base font-medium"
>
{item.name}
</NavLink>
))}
</div>
{user ? (
<div className="md:hidden">
{userNavigation.map((item) => (
<NavLink
key={item.href}
to={item.href}
className="aria-[current=page]:text-foreground text-foreground/60 block rounded-md px-3 py-2 text-base font-medium"
>
{item.name}
</NavLink>
))}
</div>
) : null}
</div>
</Disclosure.Panel>
</>
Expand Down

0 comments on commit c01c000

Please sign in to comment.