File tree Expand file tree Collapse file tree 5 files changed +28
-29
lines changed
dashboard/src/app/(app)/team/[team_slug]
playground-web/src/components Expand file tree Collapse file tree 5 files changed +28
-29
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,6 @@ export function TeamHighlightsCard({
7676 : "activeUsers"
7777 }
7878 aggregateFn = { ( _data , key ) => {
79- if ( key === "activeUsers" ) {
80- return Math . max ( ...timeSeriesData . map ( ( d ) => d [ key ] ) ) ;
81- }
8279 return timeSeriesData . reduce ( ( acc , curr ) => acc + curr [ key ] , 0 ) ;
8380 } }
8481 chartConfig = { chartConfig }
Original file line number Diff line number Diff line change @@ -70,9 +70,6 @@ export function ProjectHighlightsCard(props: {
7070 : "activeUsers"
7171 }
7272 aggregateFn = { ( _data , key ) => {
73- if ( key === "activeUsers" ) {
74- return Math . max ( ...timeSeriesData . map ( ( d ) => d [ key ] ) ) ;
75- }
7673 return timeSeriesData . reduce ( ( acc , curr ) => acc + curr [ key ] , 0 ) ;
7774 } }
7875 chartConfig = { chartConfig }
Original file line number Diff line number Diff line change 33import { MoonIcon , SunIcon } from "lucide-react" ;
44import { useTheme } from "next-themes" ;
55import { ClientOnly } from "@/components/ClientOnly" ;
6- import { Button } from "@/components/ui/button" ;
6+ import {
7+ SidebarMenu ,
8+ SidebarMenuButton ,
9+ SidebarMenuItem ,
10+ } from "@/components/ui/sidebar" ;
711import { Skeleton } from "@/components/ui/skeleton" ;
812
913export function ThemeToggle ( ) {
1014 const { setTheme, theme } = useTheme ( ) ;
1115
1216 return (
13- < div className = "border-t pt-2" >
14- < ClientOnly
15- ssr = { < Skeleton className = "size-[34px] rounded-full border bg-accent" /> }
16- >
17- < Button
17+ < SidebarMenu >
18+ < SidebarMenuItem >
19+ < SidebarMenuButton
1820 aria-label = "Toggle theme"
1921 className = "w-full text-muted-foreground hover:text-foreground px-2 py-1.5 text-left justify-start gap-2 capitalize h-auto font-normal"
2022 onClick = { ( ) => {
2123 setTheme ( theme === "dark" ? "light" : "dark" ) ;
2224 } }
23- size = "sm"
24- variant = "ghost"
2525 >
26- { theme === "light" ? (
27- < SunIcon className = "size-4" />
28- ) : (
29- < MoonIcon className = "size-4" />
30- ) }
26+ < ClientOnly ssr = { < Skeleton className = "size-4" /> } >
27+ { theme === "light" ? (
28+ < SunIcon className = "size-4" />
29+ ) : (
30+ < MoonIcon className = "size-4" />
31+ ) }
32+ </ ClientOnly >
3133
32- { theme }
33- </ Button >
34- </ ClientOnly >
35- </ div >
34+ < ClientOnly ssr = { < Skeleton className = "w-16 h-4" /> } >
35+ < span > { theme } </ span >
36+ </ ClientOnly >
37+ </ SidebarMenuButton >
38+ </ SidebarMenuItem >
39+ </ SidebarMenu >
3640 ) ;
3741}
Original file line number Diff line number Diff line change 11"use client" ;
22
3- import { ChevronDownIcon , ChevronRightIcon } from "lucide-react" ;
3+ import { ChevronRightIcon } from "lucide-react" ;
44import Link from "next/link" ;
55import { useMemo , useState } from "react" ;
66import {
@@ -126,6 +126,7 @@ function FullWidthSidebarLayoutInner(props: FullWidthSidebarLayoutProps) {
126126 links = { footerSidebarLinks }
127127 fullPath = { props . fullPath }
128128 />
129+ < SidebarSeparator />
129130 < ThemeToggle />
130131 </ SidebarFooter >
131132 ) }
@@ -289,7 +290,7 @@ function RenderSidebarSubmenu(props: {
289290 < DynamicHeight transition = "height 200ms ease" >
290291 < SidebarMenuItem >
291292 < Collapsible
292- className = "group/collapsible [&[data-state=open]>button>svg[data-chevron]]:rotate-180 "
293+ className = "group/collapsible [&[data-state=open]>button>svg[data-chevron]]:rotate-90 "
293294 defaultOpen = { open }
294295 open = { open }
295296 onOpenChange = { setOpen }
@@ -307,9 +308,9 @@ function RenderSidebarSubmenu(props: {
307308 < span > { props . subMenu . label } </ span >
308309
309310 { sidebar . open && (
310- < ChevronDownIcon
311+ < ChevronRightIcon
311312 data-chevron
312- className = "transition-transform ml-auto"
313+ className = "transition-transform ml-auto text-foreground "
313314 />
314315 ) }
315316 </ SidebarMenuButton >
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import { cn } from "@/lib/utils";
2727
2828const SIDEBAR_COOKIE_NAME = "sidebar_state" ;
2929const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7 ;
30- const SIDEBAR_WIDTH = "19rem " ;
31- const SIDEBAR_WIDTH_MOBILE = "19rem " ;
30+ const SIDEBAR_WIDTH = "18rem " ;
31+ const SIDEBAR_WIDTH_MOBILE = "18rem " ;
3232const SIDEBAR_WIDTH_ICON = "3rem" ;
3333const SIDEBAR_KEYBOARD_SHORTCUT = "b" ;
3434
You can’t perform that action at this time.
0 commit comments