Theme and default functionality
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from "../ui/dropdown-menu";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
import { EntityId, SetState, Workspace } from "@/lib/types";
|
||||
import { EntityId, Route, SetState, Workspace } from "@/lib/types";
|
||||
|
||||
export default function AppSidebar({
|
||||
children,
|
||||
@@ -25,7 +25,7 @@ export default function AppSidebar({
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
workspace: Workspace;
|
||||
setRoute: SetState<EntityId | undefined>;
|
||||
setRoute: SetState<Route>;
|
||||
}>) {
|
||||
return (
|
||||
<SidebarProvider>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user