Very awful code

This commit is contained in:
2025-11-11 20:39:42 +01:00
parent 03a8b837b6
commit 02c2543b3a
3 changed files with 66 additions and 29 deletions
+4 -5
View File
@@ -9,15 +9,14 @@ import {
} from "../ui/sidebar";
import { Collapsible, CollapsibleContent } from "../ui/collapsible";
import { ChevronDown } from "lucide-react";
import { Entity } from "@/hooks/workspace";
export interface Entity {
id: string;
name: string;
export interface SidebarEntity extends Entity {
kind: "group" | "todo";
children?: Entity[];
children?: SidebarEntity[];
}
export default function EntitySwitch({ entity }: { entity: Entity }) {
export default function EntitySwitch({ entity }: { entity: SidebarEntity }) {
switch (entity.kind) {
case "group":
return (