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({
76
76
: "activeUsers"
77
77
}
78
78
aggregateFn = { ( _data , key ) => {
79
- if ( key === "activeUsers" ) {
80
- return Math . max ( ...timeSeriesData . map ( ( d ) => d [ key ] ) ) ;
81
- }
82
79
return timeSeriesData . reduce ( ( acc , curr ) => acc + curr [ key ] , 0 ) ;
83
80
} }
84
81
chartConfig = { chartConfig }
Original file line number Diff line number Diff line change @@ -70,9 +70,6 @@ export function ProjectHighlightsCard(props: {
70
70
: "activeUsers"
71
71
}
72
72
aggregateFn = { ( _data , key ) => {
73
- if ( key === "activeUsers" ) {
74
- return Math . max ( ...timeSeriesData . map ( ( d ) => d [ key ] ) ) ;
75
- }
76
73
return timeSeriesData . reduce ( ( acc , curr ) => acc + curr [ key ] , 0 ) ;
77
74
} }
78
75
chartConfig = { chartConfig }
Original file line number Diff line number Diff line change 3
3
import { MoonIcon , SunIcon } from "lucide-react" ;
4
4
import { useTheme } from "next-themes" ;
5
5
import { ClientOnly } from "@/components/ClientOnly" ;
6
- import { Button } from "@/components/ui/button" ;
6
+ import {
7
+ SidebarMenu ,
8
+ SidebarMenuButton ,
9
+ SidebarMenuItem ,
10
+ } from "@/components/ui/sidebar" ;
7
11
import { Skeleton } from "@/components/ui/skeleton" ;
8
12
9
13
export function ThemeToggle ( ) {
10
14
const { setTheme, theme } = useTheme ( ) ;
11
15
12
16
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
18
20
aria-label = "Toggle theme"
19
21
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"
20
22
onClick = { ( ) => {
21
23
setTheme ( theme === "dark" ? "light" : "dark" ) ;
22
24
} }
23
- size = "sm"
24
- variant = "ghost"
25
25
>
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 >
31
33
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 >
36
40
) ;
37
41
}
Original file line number Diff line number Diff line change 1
1
"use client" ;
2
2
3
- import { ChevronDownIcon , ChevronRightIcon } from "lucide-react" ;
3
+ import { ChevronRightIcon } from "lucide-react" ;
4
4
import Link from "next/link" ;
5
5
import { useMemo , useState } from "react" ;
6
6
import {
@@ -126,6 +126,7 @@ function FullWidthSidebarLayoutInner(props: FullWidthSidebarLayoutProps) {
126
126
links = { footerSidebarLinks }
127
127
fullPath = { props . fullPath }
128
128
/>
129
+ < SidebarSeparator />
129
130
< ThemeToggle />
130
131
</ SidebarFooter >
131
132
) }
@@ -289,7 +290,7 @@ function RenderSidebarSubmenu(props: {
289
290
< DynamicHeight transition = "height 200ms ease" >
290
291
< SidebarMenuItem >
291
292
< 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 "
293
294
defaultOpen = { open }
294
295
open = { open }
295
296
onOpenChange = { setOpen }
@@ -307,9 +308,9 @@ function RenderSidebarSubmenu(props: {
307
308
< span > { props . subMenu . label } </ span >
308
309
309
310
{ sidebar . open && (
310
- < ChevronDownIcon
311
+ < ChevronRightIcon
311
312
data-chevron
312
- className = "transition-transform ml-auto"
313
+ className = "transition-transform ml-auto text-foreground "
313
314
/>
314
315
) }
315
316
</ SidebarMenuButton >
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import { cn } from "@/lib/utils";
27
27
28
28
const SIDEBAR_COOKIE_NAME = "sidebar_state" ;
29
29
const 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 " ;
32
32
const SIDEBAR_WIDTH_ICON = "3rem" ;
33
33
const SIDEBAR_KEYBOARD_SHORTCUT = "b" ;
34
34
You can’t perform that action at this time.
0 commit comments