Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
close bar on redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
JibrilExe committed Mar 12, 2024
1 parent 6d1e576 commit fb3dfa0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AppBar, Box, Button, Drawer, Grid, IconButton, List, ListItemButton, ListItemText, Toolbar, Typography } from "@mui/material";
import { Menu } from "@mui/icons-material";
import { useTranslation } from 'react-i18next';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import { Link, useLocation } from 'react-router-dom';
import { useState } from "react";

/**
Expand All @@ -11,7 +11,6 @@ import { useState } from "react";
export function Header(): JSX.Element {
const { t } = useTranslation();
const location = useLocation();
const navigate = useNavigate();
const [open, setOpen] = useState(false);

const listItems = [
Expand Down Expand Up @@ -83,7 +82,7 @@ function DrawerMenu({ open, onClose, listItems }: { open: boolean, onClose: () =
</Grid>
<List>
{listItems.map((listItem, index) => (
<ListItemButton key={index} component={Link} to={listItem.link} role="listitem">
<ListItemButton key={index} component={Link} to={listItem.link} role="listitem" onClick={onClose}>
<ListItemText primary={listItem.text} sx={{color:"white"}} />
</ListItemButton>
))}
Expand Down

0 comments on commit fb3dfa0

Please sign in to comment.