diff options
Diffstat (limited to 'apps/web/components/dashboard/settings')
3 files changed, 23 insertions, 23 deletions
diff --git a/apps/web/components/dashboard/settings/AddApiKey.tsx b/apps/web/components/dashboard/settings/AddApiKey.tsx index a4fd9c25..15a78d56 100644 --- a/apps/web/components/dashboard/settings/AddApiKey.tsx +++ b/apps/web/components/dashboard/settings/AddApiKey.tsx @@ -1,17 +1,10 @@ "use client"; +import type { SubmitErrorHandler } from "react-hook-form"; +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { ActionButton } from "@/components/ui/action-button"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { - Form, - FormControl, - FormDescription, - FormField, - FormItem, - FormLabel, - FormMessage, -} from "@/components/ui/form"; - import { Dialog, DialogClose, @@ -22,15 +15,22 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; -import { z } from "zod"; -import { useRouter } from "next/navigation"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { useForm, SubmitErrorHandler } from "react-hook-form"; +import { + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; +import { Input } from "@/components/ui/input"; import { toast } from "@/components/ui/use-toast"; import { api } from "@/lib/trpc"; -import { useState } from "react"; +import { zodResolver } from "@hookform/resolvers/zod"; import { Check, Copy } from "lucide-react"; -import { ActionButton } from "@/components/ui/action-button"; +import { useForm } from "react-hook-form"; +import { z } from "zod"; function ApiKeySuccess({ apiKey }: { apiKey: string }) { const [isCopied, setCopied] = useState(false); diff --git a/apps/web/components/dashboard/settings/ApiKeySettings.tsx b/apps/web/components/dashboard/settings/ApiKeySettings.tsx index 1598f25f..a3680863 100644 --- a/apps/web/components/dashboard/settings/ApiKeySettings.tsx +++ b/apps/web/components/dashboard/settings/ApiKeySettings.tsx @@ -7,8 +7,9 @@ import { TableRow, } from "@/components/ui/table"; import { api } from "@/server/api/client"; -import DeleteApiKey from "./DeleteApiKey"; + import AddApiKey from "./AddApiKey"; +import DeleteApiKey from "./DeleteApiKey"; export default async function ApiKeys() { const keys = await api.apiKeys.list(); diff --git a/apps/web/components/dashboard/settings/DeleteApiKey.tsx b/apps/web/components/dashboard/settings/DeleteApiKey.tsx index 566136af..091f352c 100644 --- a/apps/web/components/dashboard/settings/DeleteApiKey.tsx +++ b/apps/web/components/dashboard/settings/DeleteApiKey.tsx @@ -1,8 +1,9 @@ "use client"; +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { ActionButton } from "@/components/ui/action-button"; import { Button } from "@/components/ui/button"; -import { Trash } from "lucide-react"; - import { Dialog, DialogClose, @@ -13,11 +14,9 @@ import { DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; -import { useRouter } from "next/navigation"; import { toast } from "@/components/ui/use-toast"; import { api } from "@/lib/trpc"; -import { ActionButton } from "@/components/ui/action-button"; -import { useState } from "react"; +import { Trash } from "lucide-react"; export default function DeleteApiKey({ name, |
