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:
@@ -1,5 +1,5 @@
|
||||
import type React from 'react'
|
||||
import { Outlet } from 'react-router-dom'
|
||||
import { Outlet, useLocation } from 'react-router-dom'
|
||||
import BottomNav from './BottomNav'
|
||||
import SideNav from './SideNav'
|
||||
import { ActionButtonProvider } from '../../contexts/ActionButtonContext'
|
||||
@@ -72,10 +72,13 @@ function TopBar() {
|
||||
}
|
||||
|
||||
function AppLayout() {
|
||||
const { pathname } = useLocation()
|
||||
const showTopBar = pathname === '/'
|
||||
|
||||
return (
|
||||
<ActionButtonProvider>
|
||||
<TopBar />
|
||||
<div style={{ display: 'flex', height: '100dvh', background: 'var(--bg-1)', paddingTop: 44 }}>
|
||||
{showTopBar && <TopBar />}
|
||||
<div style={{ display: 'flex', height: '100dvh', background: 'var(--bg-1)', paddingTop: showTopBar ? 44 : 0 }}>
|
||||
<div className="hidden lg:flex" style={{ flexShrink: 0 }}>
|
||||
<SideNav />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user