import { queryClient } from "../../App"; import { useRef } from "react"; import { useMutation, useQuery } from "react-query"; import { KeyField } from "../../components/fields/text"; import { DeleteModal } from "../../components/modals"; import APIKeyAddForm from "../../forms/settings/APIKeyAddForm"; import Toast from "../../components/notifications/Toast"; import { APIClient } from "../../api/APIClient"; import { useToggle } from "../../hooks/hooks"; import { toast } from "react-hot-toast"; import { classNames } from "../../utils"; import { TrashIcon } from "@heroicons/react/24/outline"; import { EmptySimple } from "../../components/emptystates"; function APISettings() { const [addFormIsOpen, toggleAddForm] = useToggle(false); const { data } = useQuery( ["apikeys"], () => APIClient.apikeys.getAll(), { retry: false, refetchOnWindowFocus: false, onError: err => console.log(err) } ); return (
Manage API keys.