import { AppBar, Box, Button, Toolbar, Typography } from '@mui/material'; import { Link as RouterLink, useLocation } from 'react-router-dom'; const navLinks = [ { to: '/', label: 'Home' }, { to: '/start', label: 'Start' }, { to: '/pick-lists', label: 'Pick Lists' }, { to: '/products', label: 'Products' }, { to: '/categories', label: 'Categories' }, { to: '/areas', label: 'Areas' }, { to: '/data', label: 'Import/Export' }, { to: '/scan', label: 'Scan' }, ]; const isActivePath = (currentPath: string, target: string) => currentPath === target || currentPath.startsWith(`${target}/`); export const NavigationBar = () => { const location = useLocation(); return ( StockFill {navLinks.map((link) => { const active = isActivePath(location.pathname, link.to); return ( ); })} ); };