Skip to content

Commit

Permalink
chore: Add underline styling to mobile menu links (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokamoto authored and phoenixpereira committed Feb 24, 2024
1 parent e48fc50 commit 97c5c2a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
13 changes: 11 additions & 2 deletions src/components/Header/HeaderMobileClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,18 @@ export default function HeaderMobileClient({
<MenuLinks data={data} onClick={closeMenu} />

{/* Links for sign up, sign in, sign out */}
{!data.isSignedIn && <SignInJoinMobile onClick={closeMenu} />}
{!data.isSignedIn && (
<SignInJoinMobile
className="block hover:underline"
onClick={closeMenu}
/>
)}
{data.isSignedIn && (
<Link href="/" onClick={handleSignOut}>
<Link
href="/"
className="block hover:underline"
onClick={handleSignOut}
>
Sign Out
</Link>
)}
Expand Down
12 changes: 9 additions & 3 deletions src/components/Header/components/SignInJoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ export function SignInJoin() {
);
}

export function SignInJoinMobile({ onClick }: { onClick?: () => void }) {
export function SignInJoinMobile({
className,
onClick,
}: {
className: string;
onClick?: () => void;
}) {
return (
<>
<Link onClick={onClick} href="/signin">
<Link onClick={onClick} className={className} href="/signin">
Sign In
</Link>
<Link onClick={onClick} href="/join">
<Link onClick={onClick} className={className} href="/join">
Join Us
</Link>
</>
Expand Down

0 comments on commit 97c5c2a

Please sign in to comment.