"use client"; import * as React from "react"; import Link from "next/link"; import { Alert } from "@/components/ui/alert"; import { Button } from "@/components/ui/button"; import { CopyButton } from "@/components/ui/copy-button"; import { CodeBlock } from "@/components/ui/code-block"; import { curlSnippet } from "@/lib/account-snippets"; /** * One-time display of a freshly created / rotated key. The plaintext is only ever * available in memory here — it is never sent back by the server again. */ export function KeyReveal({ plaintext, name, onDone, doneLabel = "Done", compact }: { plaintext: string; name: string; onDone?: () => void; doneLabel?: string; compact?: boolean }) { const [ack, setAck] = React.useState(false); return (
We store only a hash of this key. If you lose it, rotate the key to get a new one.
{name}
{plaintext}
{!compact ? : null} {onDone ? (
) : null}
); }