// src/components/NavigationMenu.js
import React, { useState } from 'react';
import {
AppBar,
Toolbar,
IconButton,
Typography,
Drawer,
List,
ListItem,
ListItemIcon,
ListItemText,
Divider,
} from '@mui/material';
import {
Menu as MenuIcon,
Home as HomeIcon,
Assessment as AssessmentIcon,
EmojiEvents as LeagueIcon,
SportsMartialArts as PracticeIcon,
Settings as SettingsIcon,
} from '@mui/icons-material';
import { useScore } from '../context/ScoreContext';
const NavigationMenu = ({ onNavigate }) => {
const [drawerOpen, setDrawerOpen] = useState(false);
const { state } = useScore();
const menuItems = [
{ title: 'Home', icon: , action: 'home' },
{ title: 'League Shoots', icon: , action: 'league' },
{ title: 'Practice Shoots', icon: , action: 'practice' },
{ title: 'Statistics', icon: , action: 'stats' },
{ title: 'Settings', icon: , action: 'settings' },
];
const handleNavigation = (action) => {
setDrawerOpen(false);
onNavigate(action);
};
return (
<>
setDrawerOpen(true)}
>
Archery Score Card
setDrawerOpen(false)}
>
{menuItems.map((item) => (
handleNavigation(item.action)}
>
{item.icon}
))}
>
);
};
export default NavigationMenu;