2025-09-15 13:37:53 +02:00

37 lines
934 B
TypeScript

import React from 'react'
import { AppBar, Toolbar, Typography, Container, Box } from '@mui/material'
import { useNavigate, useLocation } from 'react-router-dom'
import { NavigationTabs } from './NavigationTabs'
interface LayoutProps {
children: React.ReactNode
}
export const Layout: React.FC<LayoutProps> = ({ children }) => {
const navigate = useNavigate()
const location = useLocation()
return (
<Box sx={{ flexGrow: 1 }}>
<AppBar position="static">
<Toolbar>
<Typography
variant="h6"
component="div"
sx={{ flexGrow: 1, cursor: 'pointer' }}
onClick={() => navigate('/')}
>
4NK IA - Lecoffre.io
</Typography>
</Toolbar>
</AppBar>
<NavigationTabs currentPath={location.pathname} />
<Container maxWidth="xl" sx={{ mt: 3, mb: 3 }}>
{children}
</Container>
</Box>
)
}