diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx deleted file mode 100644 index 04d6b180..00000000 --- a/src/components/ui/dropdown-menu.tsx +++ /dev/null @@ -1,262 +0,0 @@ -"use client"; - -import { Menu as MenuPrimitive } from "@base-ui/react/menu"; -import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"; -import type * as React from "react"; - -import { resolveAsChild } from "@/lib/as-child"; -import { cn } from "@/lib/utils"; - -function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) { - return ; -} - -function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) { - return ; -} - -function DropdownMenuTrigger({ - asChild = false, - children, - render, - ...props -}: MenuPrimitive.Trigger.Props & { asChild?: boolean }) { - const resolved = resolveAsChild(asChild, children, render); - return ( - - {resolved.children} - - ); -} - -function DropdownMenuContent({ - className, - align = "start", - alignOffset = 0, - side = "bottom", - sideOffset = 4, - ...props -}: MenuPrimitive.Popup.Props & - Pick< - MenuPrimitive.Positioner.Props, - "align" | "alignOffset" | "side" | "sideOffset" - >) { - return ( - - - - - - ); -} - -function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) { - return ; -} - -function DropdownMenuItem({ - className, - inset, - variant = "default", - ...props -}: MenuPrimitive.Item.Props & { - inset?: boolean; - variant?: "default" | "destructive"; -}) { - return ( - - ); -} - -function DropdownMenuCheckboxItem({ - className, - children, - checked, - ...props -}: MenuPrimitive.CheckboxItem.Props) { - return ( - - - - - - - {children} - - ); -} - -function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) { - return ( - - ); -} - -function DropdownMenuRadioItem({ - className, - children, - ...props -}: MenuPrimitive.RadioItem.Props) { - return ( - - - - - - - {children} - - ); -} - -function DropdownMenuLabel({ - className, - inset, - ...props -}: MenuPrimitive.GroupLabel.Props & { - inset?: boolean; -}) { - return ( - - ); -} - -function DropdownMenuSeparator({ - className, - ...props -}: MenuPrimitive.Separator.Props) { - return ( - - ); -} - -function DropdownMenuShortcut({ - className, - ...props -}: React.ComponentProps<"span">) { - return ( - - ); -} - -function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) { - return ; -} - -function DropdownMenuSubTrigger({ - className, - inset, - children, - ...props -}: MenuPrimitive.SubmenuTrigger.Props & { - inset?: boolean; -}) { - return ( - - {children} - - - ); -} - -function DropdownMenuSubContent({ - className, - ...props -}: React.ComponentProps) { - return ( - - ); -} - -export { - DropdownMenu, - DropdownMenuCheckboxItem, - DropdownMenuContent, - DropdownMenuGroup, - DropdownMenuItem, - DropdownMenuLabel, - DropdownMenuPortal, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuSub, - DropdownMenuSubContent, - DropdownMenuSubTrigger, - DropdownMenuTrigger, -}; diff --git a/src/lib/admin/verify-interactions.ts b/src/lib/admin/verify-interactions.ts deleted file mode 100644 index 98311d9b..00000000 --- a/src/lib/admin/verify-interactions.ts +++ /dev/null @@ -1,40 +0,0 @@ -export const VERIFY_INTERACTIONS_URL = "/api/admin/import/furni/verify"; - -export interface VerifyInteractionsResult { - fixed: number; - checked: number; - skipped: number; - errors: string[]; -} - -type AdminFetcher = ( - input: RequestInfo | URL, - init?: RequestInit, -) => Promise; - -export async function requestVerifyInteractions( - fetcher: AdminFetcher, -): Promise { - const response = await fetcher(VERIFY_INTERACTIONS_URL, { method: "POST" }); - const payload = (await response.json()) as Record; - if (!response.ok) { - throw new Error( - typeof payload.error === "string" - ? payload.error - : "Interaction verification failed", - ); - } - - const errors = Array.isArray(payload.errors) - ? payload.errors.filter( - (value): value is string => typeof value === "string", - ) - : []; - - return { - fixed: Number(payload.fixed) || 0, - checked: Number(payload.checked) || 0, - skipped: Number(payload.skipped) || 0, - errors, - }; -}