Skip to content

Commit

Permalink
fix: mobile style
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Sep 23, 2024
1 parent af13bb9 commit 455b06d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/NavbarList.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useEffect, useState } from 'react';
import { Group, Space, Stack, Menu, Button, Text } from '@mantine/core';
import { Group, Space, Stack, Menu, Button, Text, Center } from '@mantine/core';
import { useRouter } from 'next/navigation';
import classes from '@/components/Header.module.css';
import { Cookie } from '@/components/cookie';
import { ColorSchemeToggle } from './ColorSchemeToggle';

interface Link {
link: string;
Expand Down Expand Up @@ -46,7 +47,7 @@ export function NavbarList() {
sessionStorage.setItem('logOutAndRedirect', 'true');
window.location.reload();
};

useEffect(() => {
if (sessionStorage.getItem('logOutAndRedirect') === 'true') {
sessionStorage.removeItem('logOutAndRedirect');
Expand All @@ -61,8 +62,7 @@ export function NavbarList() {
onClick={() => handleClick(link.link)}
onKeyDown={(e) => e.key === 'Enter' && handleClick(link.link)}
tabIndex={0}
aria-label={link.label}
color="white"
variant="subtle"
>
{link.label}
</Button>
Expand Down Expand Up @@ -119,6 +119,9 @@ export function NavbarList() {
</Button>
)}
{items}
<Center>
<ColorSchemeToggle />
</Center>
</Stack>
</Group>
);
Expand Down

0 comments on commit 455b06d

Please sign in to comment.