Skip to content

Commit 2aa90b7

Browse files
authored
Merge branch 'main' into yash/ocr-contracts-integration
2 parents 3722e3e + 857d4df commit 2aa90b7

File tree

5 files changed

+28
-29
lines changed

5 files changed

+28
-29
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/analytics/highlights-card.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/overview/highlights-card.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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}

apps/playground-web/src/components/ThemeToggle.tsx

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,39 @@
33
import { MoonIcon, SunIcon } from "lucide-react";
44
import { useTheme } from "next-themes";
55
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";
711
import { Skeleton } from "@/components/ui/skeleton";
812

913
export 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
}

apps/playground-web/src/components/blocks/full-width-sidebar-layout.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { ChevronDownIcon, ChevronRightIcon } from "lucide-react";
3+
import { ChevronRightIcon } from "lucide-react";
44
import Link from "next/link";
55
import { useMemo, useState } from "react";
66
import {
@@ -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>

apps/playground-web/src/components/ui/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import { cn } from "@/lib/utils";
2727

2828
const SIDEBAR_COOKIE_NAME = "sidebar_state";
2929
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";
3232
const SIDEBAR_WIDTH_ICON = "3rem";
3333
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
3434

0 commit comments

Comments
 (0)