import { Dispatch, SetStateAction, FC } from "react"; // icons import { Copy } from "lucide-react"; // ui import { Button } from "@plane/ui"; // hooks import useToast from "hooks/use-toast"; // types import { IApiToken } from "types/api_token"; interface APITokenKeySectionProps { generatedToken: IApiToken | null | undefined; renderExpiry: () => string; setDeleteTokenModal: Dispatch>; } export const APITokenKeySection: FC = (props) => { const { generatedToken, renderExpiry, setDeleteTokenModal } = props; // hooks const { setToastAlert } = useToast(); return generatedToken ? (

Api key created successfully

Save this API key somewhere safe. You will not be able to view it again once you close this page or reload this page.

{generatedToken.expired_at ? "Expires on " + renderExpiry() : "Never Expires"}

) : null; };