feat: use sidebar layout for main app pages only

This commit is contained in:
amhsirak
2025-11-05 22:12:07 +05:30
parent 5ab8455c04
commit 4c5191f0a0

View File

@@ -86,13 +86,16 @@ 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,
@@ -103,8 +106,8 @@ export const PageWrapper = () => {
</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 />}>