import * as React from "react"; import { Button } from "@/components/ui/button"; import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "@/components/ui/command"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { ChevronDownIcon } from "@heroicons/react/24/solid"; import { getAvailableSites } from "@/utils"; import { SelectOptions } from "@/types.js"; export function SitesCombobox() { const statuses = getAvailableSites(); const [open, setOpen] = React.useState(false); const [selectedStatus, setSelectedStatus] = React.useState(null); return (
No results found. {statuses?.map((status) => ( { setSelectedStatus( statuses.find((priority) => priority.value === value) || null ); setOpen(false); }} > {status.label} ))}
); }