This commit is contained in:
Simon CATANESE 2024-05-12 21:44:42 +02:00
parent aa59eaa3fc
commit 2444f620f5

View File

@ -40,14 +40,6 @@ const Navbar = () => {
}, []); }, []);
const roomItems = rooms.map((room, index) => (
console.log(index),
getItem(`sub${index}`, room.name)
));
const items = [ const items = [
<Menu.Item key="0"> <Menu.Item key="0">
<Link to="/">Menu Principal</Link> <Link to="/">Menu Principal</Link>
@ -58,10 +50,7 @@ const Navbar = () => {
<Menu.Item key="2" > <Menu.Item key="2" >
<Link to="/items">Tous les articles</Link> <Link to="/items">Tous les articles</Link>
</Menu.Item>, </Menu.Item>,
<SubMenu key="3" title="Chambres"> <Menu.Item key="3" >
{roomItems}
</SubMenu>,
<Menu.Item key="4" >
<Link to="/rooms">Voir les chambres</Link> <Link to="/rooms">Voir les chambres</Link>
</Menu.Item>, </Menu.Item>,