Skip to content

Commit

Permalink
Merge pull request #99 from compsci-adl/main
Browse files Browse the repository at this point in the history
Production 2024-02-20_03
  • Loading branch information
rayokamoto authored Feb 19, 2024
2 parents 4c0307e + 291145c commit c02c0f8
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 c02c0f8

Please sign in to comment.