import { Button } from "@plane/ui"; import useToast from "hooks/use-toast"; import { Copy } from "lucide-react"; import { Dispatch, SetStateAction } from "react"; import { IApiToken } from "types/api_token"; interface IApiTokenKeySection { generatedToken: IApiToken | null | undefined; renderExpiry: () => string; setDeleteTokenModal: Dispatch>; } export const ApiTokenKeySection = ({ generatedToken, renderExpiry, setDeleteTokenModal }: IApiTokenKeySection) => { 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; };