feat: use sidebar layout for main app pages only
This commit is contained in:
@@ -85,26 +85,29 @@ export const PageWrapper = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [location.pathname, navigate, setBrowserId, setRecordingId, setRecordingName, setRecordingUrl]);
|
}, [location.pathname, navigate, setBrowserId, setRecordingId, setRecordingName, setRecordingUrl]);
|
||||||
|
|
||||||
|
const isAuthPage = location.pathname === '/login' || location.pathname === '/register';
|
||||||
|
const isRecordingPage = location.pathname === '/recording';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<AuthProvider>
|
<AuthProvider>
|
||||||
<SocketProvider>
|
<SocketProvider>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{/* Sticky NavBar - only show on non-recording pages */}
|
{/* Show NavBar only for main app pages, not for recording pages */}
|
||||||
{location.pathname !== '/recording' && (
|
{!isRecordingPage && (
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
top: 0,
|
top: 0,
|
||||||
zIndex: 1100,
|
zIndex: 1100,
|
||||||
backgroundColor: 'background.paper'
|
backgroundColor: 'background.paper'
|
||||||
}}>
|
}}>
|
||||||
<NavBar recordingName={recordingName} isRecording={false} />
|
<NavBar recordingName={recordingName} isRecording={false} />
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
display: 'flex',
|
display: isAuthPage || isRecordingPage ? 'block' : 'flex',
|
||||||
minHeight: location.pathname !== '/recording' ? 'calc(100vh - 64px)' : '100vh'
|
minHeight: isAuthPage || isRecordingPage ? '100vh' : 'calc(100vh - 64px)'
|
||||||
}}>
|
}}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route element={<UserRoute />}>
|
<Route element={<UserRoute />}>
|
||||||
|
|||||||
Reference in New Issue
Block a user