Skip to content

Commit

Permalink
Fix mobile navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
amrabed committed Sep 2, 2024
1 parent cb64716 commit fbe9fa4
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,15 @@ const Title = () => (

export const MainHeader = () => (
<Navbar>
<NavbarContent className="sm:hidden" justify="start">
<NavbarMenuToggle />
</NavbarContent>
<NavbarBrand>
<Title />
</NavbarBrand>

<NavbarContent className="sm:hidden pr-3" justify="center">
<NavbarBrand>
<Title />
</NavbarBrand>
<NavbarContent className="sm:hidden" justify="end">
<NavbarMenuToggle />
</NavbarContent>

<NavbarContent className="hidden sm:flex gap-4" justify="start">
<NavbarBrand>
<Title />
</NavbarBrand>
{sections.map((section, index) => (
<NavbarItem key={index}>
<Link
Expand Down Expand Up @@ -95,10 +90,12 @@ export const MainHeader = () => (
{sections.map((section, index) => (
<NavbarMenuItem key={index}>
<Link
className="text-lg p-2 hover:text-primary hover:dark:text-primary-dark"
className="hover:text-primary hover:dark:text-primary-dark"
href={section.link}
>
{section.name}
<div className="text-lg p-1 hover:text-primary hover:dark:text-primary-dark">
{section.name}
</div>
</Link>
</NavbarMenuItem>
))}
Expand All @@ -109,7 +106,7 @@ export const MainHeader = () => (
className={"hover:text-primary hover:dark:text-primary-dark"}
href={page.link}
>
<div className="text-lg p-2 hover:text-primary hover:dark:text-primary-dark">
<div className="text-lg p-1 hover:text-primary hover:dark:text-primary-dark">
{page.name}
</div>
</Link>
Expand Down

0 comments on commit fbe9fa4

Please sign in to comment.