fix(ui): TopBar visible uniquement sur la page d'accueil

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 14:00:15 +02:00
co-authored by Claude Sonnet 4.6
parent 31d60983b2
commit 3d77ed6cc7
+6 -3
View File
@@ -1,5 +1,5 @@
import type React from 'react' import type React from 'react'
import { Outlet } from 'react-router-dom' import { Outlet, useLocation } from 'react-router-dom'
import BottomNav from './BottomNav' import BottomNav from './BottomNav'
import SideNav from './SideNav' import SideNav from './SideNav'
import { ActionButtonProvider } from '../../contexts/ActionButtonContext' import { ActionButtonProvider } from '../../contexts/ActionButtonContext'
@@ -72,10 +72,13 @@ function TopBar() {
} }
function AppLayout() { function AppLayout() {
const { pathname } = useLocation()
const showTopBar = pathname === '/'
return ( return (
<ActionButtonProvider> <ActionButtonProvider>
<TopBar /> {showTopBar && <TopBar />}
<div style={{ display: 'flex', height: '100dvh', background: 'var(--bg-1)', paddingTop: 44 }}> <div style={{ display: 'flex', height: '100dvh', background: 'var(--bg-1)', paddingTop: showTopBar ? 44 : 0 }}>
<div className="hidden lg:flex" style={{ flexShrink: 0 }}> <div className="hidden lg:flex" style={{ flexShrink: 0 }}>
<SideNav /> <SideNav />
</div> </div>