/* eslint-disable max-lines */ "use client"; import Button from "@/lib/components/ui/Button"; import { Divider } from "@/lib/components/ui/Divider"; import Field from "@/lib/components/ui/Field"; import { useApiKeyConfig } from "./hooks/useApiKeyConfig"; export const ApiKeyConfig = (): JSX.Element => { const { apiKey, handleCopyClick, handleCreateClick, openAiApiKey, setOpenAiApiKey, changeOpenAiApiKey, changeOpenAiApiKeyRequestPending, userIdentity, removeOpenAiApiKey, hasOpenAiApiKey, } = useApiKeyConfig(); return ( <>
{apiKey === "" && ( )}
{apiKey !== "" && (
{apiKey}
)}
Your api key will be saved in our data. We will not use it for any other purpose. However,{" "} we have not implemented any encryption logic yet
{ event.preventDefault(); void changeOpenAiApiKey(); }} > setOpenAiApiKey(e.target.value)} />
{hasOpenAiApiKey && ( )}
); };