website refactor
This commit is contained in:
@@ -6,6 +6,7 @@ import { useCurrentSession } from '@/hooks/auth/useCurrentSession';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { DashboardRail } from '@/components/dashboard/DashboardRail';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
export interface GlobalSidebarViewData {}
|
||||
@@ -16,21 +17,23 @@ export function GlobalSidebarTemplate(_props: GlobalSidebarViewData) {
|
||||
const isAuthenticated = !!session;
|
||||
|
||||
return (
|
||||
<DashboardRail>
|
||||
<Box py={6}>
|
||||
<Box px={6} mb={8}>
|
||||
<Text size="xs" color="text-gray-500" weight="bold" font="mono" letterSpacing="0.2em">
|
||||
NAVIGATION
|
||||
</Text>
|
||||
<Surface variant="dark" width="280px" borderRight position="sticky" top="0" height="100vh">
|
||||
<DashboardRail>
|
||||
<Box py={6} fullWidth>
|
||||
<Box px={6} mb={8}>
|
||||
<Text size="xs" color="text-gray-500" weight="bold" font="mono" letterSpacing="0.2em">
|
||||
NAVIGATION
|
||||
</Text>
|
||||
</Box>
|
||||
<Box px={3}>
|
||||
{isAuthenticated ? (
|
||||
<AuthedNav pathname={pathname} />
|
||||
) : (
|
||||
<PublicNav pathname={pathname} />
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box px={3}>
|
||||
{isAuthenticated ? (
|
||||
<AuthedNav pathname={pathname} />
|
||||
) : (
|
||||
<PublicNav pathname={pathname} />
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</DashboardRail>
|
||||
</DashboardRail>
|
||||
</Surface>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user