'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" const fadeIn = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { duration: 0.4 } } } const staggerContainer = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1 } } } const ApiKeyClient = () => { const { apiKey, isLoading, copied, copyToClipboard } = useApiKey() return (

API Key

Your API key for authenticating with the SurfSense API.

Important Your API key grants full access to your account. Never share it publicly or with unauthorized users. Your API Key Use this key to authenticate your API requests. {isLoading ? ( ) : apiKey ? (
{apiKey}

{copied ? "Copied!" : "Copy to clipboard"}

) : ( No API key found. )}

How to use your API key

Authentication

Include your API key in the Authorization header of your requests:

Authorization: Bearer {apiKey || 'YOUR_API_KEY'}
) } export default ApiKeyClient