Theme and default functionality

This commit is contained in:
2026-02-27 21:49:14 +01:00
parent 3c17c73390
commit 3e61019b7f
5 changed files with 121 additions and 71 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ import {
} from "../ui/sidebar";
import { Collapsible, CollapsibleContent } from "../ui/collapsible";
import { ChevronDown } from "lucide-react";
import { EntityId, SetState, Workspace } from "@/lib/types";
import { EntityId, Route, SetState, Workspace } from "@/lib/types";
export type SidebarEntity =
| {
@@ -29,7 +29,7 @@ export default function EntitySwitch({
}: {
entity: SidebarEntity;
workspace: Workspace;
setRoute: SetState<EntityId | undefined>;
setRoute: SetState<Route>;
}) {
if (entity.kind === "group") {
return (
@@ -65,7 +65,7 @@ export default function EntitySwitch({
<SidebarMenuItem>
<SidebarMenuButton
onClick={() => {
setRoute(entity.id);
setRoute({ workspace: workspace.id, entity: entity.id });
}}
>
{workspace.entities[entity.id].name}