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 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>
|
||||||
|
|||||||
Reference in New Issue
Block a user