diff --git a/surfsense_web/app/dashboard/api-key/api-key-client.tsx b/surfsense_web/app/dashboard/api-key/api-key-client.tsx index 4b33fff..cf927b5 100644 --- a/surfsense_web/app/dashboard/api-key/api-key-client.tsx +++ b/surfsense_web/app/dashboard/api-key/api-key-client.tsx @@ -1,40 +1,48 @@ -'use client' +"use client"; -import React from 'react' -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" -import { Button } from "@/components/ui/button" -import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert" -import { motion, AnimatePresence } from "framer-motion" -import { IconCheck, IconCopy, IconKey } from "@tabler/icons-react" -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip" -import { useApiKey } from "@/hooks/use-api-key" +import React from "react"; +import { useRouter } from "next/navigation"; +import { ArrowLeft } from "lucide-react"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { motion, AnimatePresence } from "framer-motion"; +import { IconCheck, IconCopy, IconKey } from "@tabler/icons-react"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { useApiKey } from "@/hooks/use-api-key"; const fadeIn = { hidden: { opacity: 0 }, - visible: { opacity: 1, transition: { duration: 0.4 } } -} + visible: { opacity: 1, transition: { duration: 0.4 } }, +}; const staggerContainer = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { - staggerChildren: 0.1 - } - } -} + staggerChildren: 0.1, + }, + }, +}; const ApiKeyClient = () => { - const { - apiKey, - isLoading, - copied, - copyToClipboard - } = useApiKey() - + const { apiKey, isLoading, copied, copyToClipboard } = useApiKey(); + const router = useRouter(); return (
- Include your API key in the Authorization header of your requests: + Include your API key in the Authorization header of your + requests:
-
- Authorization: Bearer {apiKey || 'YOUR_API_KEY'}
+ Authorization: Bearer {apiKey || "YOUR_API_KEY"}