feat(worker): auth gate, Dutch login screen, router and 3-tab shell
This commit is contained in:
24
apps/worker/src/components/TabBar.tsx
Normal file
24
apps/worker/src/components/TabBar.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
const tabs = [
|
||||
{ to: '/', label: 'Stopwatch' },
|
||||
{ to: '/history', label: 'Geschiedenis' },
|
||||
{ to: '/settings', label: 'Instellingen' },
|
||||
] as const;
|
||||
|
||||
export default function TabBar() {
|
||||
return (
|
||||
<nav className="tabbar">
|
||||
{tabs.map((tab) => (
|
||||
<NavLink
|
||||
key={tab.to}
|
||||
to={tab.to}
|
||||
end={tab.to === '/'}
|
||||
className={({ isActive }) => (isActive ? 'tab tab-active' : 'tab')}
|
||||
>
|
||||
{tab.label}
|
||||
</NavLink>
|
||||
))}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user