'use client'; import { useActionState, useState } from 'react'; import { createApiKeyAction } from '@/lib/auth/account-actions'; import { idle } from '@/lib/auth/state'; import { Field, FormMessage, SubmitButton, TextInput } from '@/components/account/form'; export function CreateKeyForm() { const [state, action] = useActionState(createApiKeyAction, idle); const [copied, setCopied] = useState(false); const secret = state.data?.secret as string | undefined; return (
); }