From f8e7ec7948d04db120935304c3bc179880e4f683 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Tue, 20 Jan 2026 00:52:02 +0100 Subject: [PATCH] website refactor --- apps/website/components/layout/AppSidebar.tsx | 128 +++++++++++------- apps/website/ui/shell/Shell.tsx | 2 +- 2 files changed, 82 insertions(+), 48 deletions(-) diff --git a/apps/website/components/layout/AppSidebar.tsx b/apps/website/components/layout/AppSidebar.tsx index 141735c2a..23963a6d4 100644 --- a/apps/website/components/layout/AppSidebar.tsx +++ b/apps/website/components/layout/AppSidebar.tsx @@ -1,24 +1,25 @@ 'use client'; -import { BrandMark } from '@/ui/BrandMark'; -import { NavLink } from '@/ui/NavLink'; +import { useSidebar } from '@/components/layout/SidebarContext'; import { routes } from '@/lib/routing/RouteConfig'; +import { Box } from '@/ui/Box'; +import { BrandMark } from '@/ui/BrandMark'; +import { Button } from '@/ui/Button'; +import { NavLink } from '@/ui/NavLink'; +import { ShellSidebar } from '@/ui/shell/Shell'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; -import { - LayoutGrid, - Trophy, - Users, - Calendar, - Flag, - Home, +import { + Calendar, ChevronLeft, - ChevronRight + ChevronRight, + Flag, + Home, + LayoutGrid, + Trophy, + Users } from 'lucide-react'; import { usePathname } from 'next/navigation'; -import { useSidebar } from '@/components/layout/SidebarContext'; -import { ShellSidebar } from '@/ui/shell/Shell'; -import { Button } from '@/ui/Button'; export function AppSidebar() { const pathname = usePathname(); @@ -46,55 +47,88 @@ export function AppSidebar() { onClick={toggleCollapse} variant="ghost" fullWidth - justifyContent={isCollapsed ? 'center' : 'start'} > {!isCollapsed && "Collapse"} } > - - - {!isCollapsed && ( - - Platform - - )} + + - {mainItems.map((item) => ( - - ))} + {!isCollapsed && ( + + Platform + + )} + + {mainItems.map((item) => ( + + ))} + + + + + {!isCollapsed && ( + + Competition + + )} + + {competitionItems.map((item) => ( + + ))} + - + {!isCollapsed && ( - Competition + Community )} - - {competitionItems.map((item) => ( - - ))} + + + - + ); } diff --git a/apps/website/ui/shell/Shell.tsx b/apps/website/ui/shell/Shell.tsx index 868e32d1c..243979fd6 100644 --- a/apps/website/ui/shell/Shell.tsx +++ b/apps/website/ui/shell/Shell.tsx @@ -35,7 +35,7 @@ export function ShellSidebar({ )} - + {children}