Skip to content

Commit 713d45d

Browse files
committed
feat(dashboard): some minor dashboard style changes
1 parent 23c6c81 commit 713d45d

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

src/app/(default_layout)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Layout({
2929

3030
{/* Scrollable content */}
3131
<AppSidebar />
32-
<main className="w-full pr-6 py-6 lg:pt-8 lg:pb-3 lg:ml-break-out pl-break-out">
32+
<main className="w-full pr-6 py-6 lg:pt-6 lg:pb-3 lg:ml-break-out pl-break-out">
3333
<div className="lg:pl-6 h-full">
3434
{/* <SidebarTrigger className="size-4 h-full flex items-center my-auto -top-2.5 relative" /> */}
3535
{children}

src/components/global/navigation/sidebar.tsx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Bell,
1212
CreditCard,
1313
RouteIcon,
14+
HelpCircle,
1415
} from 'lucide-react';
1516
import {
1617
Sidebar,
@@ -21,6 +22,7 @@ import {
2122
SidebarMenu,
2223
SidebarMenuButton,
2324
SidebarMenuItem,
25+
SidebarSeparator,
2426
SidebarTrigger,
2527
} from '@/components/ui/sidebar';
2628
import {
@@ -58,7 +60,10 @@ export function AppSidebar() {
5860
// Menu items
5961
const standardItems: SidebarItemType[] = [
6062
{
61-
title: 'Home',
63+
groupLabel: 'menu',
64+
},
65+
{
66+
title: 'Dashboard',
6267
url: '/dashboard',
6368
icon: Home,
6469
},
@@ -109,6 +114,14 @@ export function AppSidebar() {
109114
url: '/leaderboard/today',
110115
icon: Award,
111116
},
117+
{
118+
groupLabel: 'Support',
119+
},
120+
{
121+
title: 'Help',
122+
url: '/help',
123+
icon: HelpCircle,
124+
},
112125
{
113126
title: 'Settings',
114127
url: '/settings/profile',
@@ -163,8 +176,8 @@ export function AppSidebar() {
163176
const renderSidebarItem = (item: SidebarItemType) => {
164177
if ('groupLabel' in item) {
165178
return (
166-
<SidebarGroup key={item.groupLabel}>
167-
<SidebarGroupLabel className="px-0 h-fit text-sm font-ubuntutoshi">
179+
<SidebarGroup key={item.groupLabel} className="mt-2">
180+
<SidebarGroupLabel className="px-0 py-0 h-fit text-sm font-ubuntutoshi">
168181
{item.groupLabel}
169182
</SidebarGroupLabel>
170183
</SidebarGroup>
@@ -205,7 +218,9 @@ export function AppSidebar() {
205218
href={item.url}
206219
prefetch
207220
className={`flex items-center font-ubuntu text-sm py-2 ${
208-
pathname === item.url ? 'bg-black border border-black-75' : ''
221+
pathname === item.url
222+
? 'bg-white text-black border border-black-75'
223+
: ''
209224
}`}
210225
>
211226
{item.icon && <item.icon />}
@@ -223,18 +238,18 @@ export function AppSidebar() {
223238

224239
return (
225240
<Sidebar>
226-
<SidebarContent className="py-2">
241+
<SidebarContent className="py-6">
227242
<SidebarGroup>
228243
<SidebarGroupLabel className="w-full flex items-center justify-between">
229244
<Link
230245
href="/dashboard"
231-
className="text-sm xl:text-xl font-ubuntu hover:text-white duration-300"
246+
className="text-sm xl:text-2xl font-ubuntu hover:text-white duration-300"
232247
prefetch
233248
>
234249
meerge
235250
</Link>
236251
</SidebarGroupLabel>
237-
<SidebarGroupContent className="mt-8">
252+
<SidebarGroupContent className="mt-5">
238253
<SidebarMenu>
239254
{items.map((item) => renderSidebarItem(item))}
240255
</SidebarMenu>

src/components/ui/sidebar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,10 @@ const SidebarGroup = React.forwardRef<
422422
<div
423423
ref={ref}
424424
data-sidebar="group"
425-
className={cn('relative flex w-full min-w-0 flex-col p-2', className)}
425+
className={cn(
426+
'relative flex w-full min-w-0 flex-col px-2 py-0',
427+
className
428+
)}
426429
{...props}
427430
/>
428431
);

0 commit comments

Comments
 (0)