mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
parent
e0aaa0bcab
commit
286f2f53f7
20 changed files with 61 additions and 63 deletions
|
@ -1,12 +1,11 @@
|
|||
import { Fragment } from "react";
|
||||
import { useMutation } from "react-query";
|
||||
import { useMutation, useQueryClient } from "react-query";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { XMarkIcon } from "@heroicons/react/24/solid";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import type { FieldProps } from "formik";
|
||||
import { Field, Form, Formik, FormikErrors, FormikValues } from "formik";
|
||||
|
||||
import { queryClient } from "../../App";
|
||||
import { APIClient } from "../../api/APIClient";
|
||||
import DEBUG from "../../components/debug";
|
||||
import Toast from "../../components/notifications/Toast";
|
||||
|
@ -17,6 +16,8 @@ interface apiKeyAddFormProps {
|
|||
}
|
||||
|
||||
function APIKeyAddForm({ isOpen, toggle }: apiKeyAddFormProps) {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const mutation = useMutation(
|
||||
(apikey: APIKey) => APIClient.apikeys.create(apikey),
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue