import { Copy } from "lucide-react"; // ui import { Button, Tooltip, TOAST_TYPE, setToast } from "@plane/ui"; // helpers import { renderFormattedDate } from "helpers/date-time.helper"; import { copyTextToClipboard } from "helpers/string.helper"; // types import { IApiToken } from "@plane/types"; type Props = { handleClose: () => void; tokenDetails: IApiToken; }; export const GeneratedTokenDetails: React.FC = (props) => { const { handleClose, tokenDetails } = props; const copyApiToken = (token: string) => { copyTextToClipboard(token).then(() => setToast({ type: TOAST_TYPE.SUCCESS, title: "Success!", message: "Token copied to clipboard.", }) ); }; return (

Key created

Copy and save this secret key in Plane Pages. You can{"'"}t see this key after you hit Close. A CSV file containing the key has been downloaded.

{tokenDetails.expired_at ? `Expires ${renderFormattedDate(tokenDetails.expired_at)}` : "Never expires"}

); };