"use client"; import { MoreHorizontal, X } from "lucide-react"; import { toast } from "sonner"; import { deleteBoard } from "@/actions/delete-board"; import { useAction } from "@/hooks/use-action"; import { Button } from "@/components/ui/button"; import { Popover, PopoverClose, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; interface BoardOptionsProps { id: string; } export const BoardOptions = ({ id }: BoardOptionsProps) => { const { execute, isLoading } = useAction(deleteBoard, { onError: (error) => { toast.error(error); }, }); const onDelete = () => { execute({ id }); }; return (
Board Actions
); };