import { faFileContract } from "@fortawesome/free-solid-svg-icons"; import { EmptyState, Table, TableContainer, TableSkeleton, TBody, Td, Th, THead, Tr } from "@app/components/v2"; import { useOrganization } from "@app/context"; import { useGetOrgLicenses } from "@app/hooks/api"; export const LicensesSection = () => { const { currentOrg } = useOrganization(); const { data, isPending } = useGetOrgLicenses(currentOrg?.id ?? ""); return (

Enterprise licenses

{!isPending && data && data?.length > 0 && data.map(({ id, licenseKey, isActivated, createdAt, expiresAt }) => { const formattedCreatedAt = new Date(createdAt).toISOString().split("T")[0]; const formattedExpiresAt = new Date(expiresAt).toISOString().split("T")[0]; return ( ); })} {isPending && } {!isPending && data && data?.length === 0 && ( )}
License Key Status Issued Date Expiry Date
{licenseKey} {isActivated ? "Active" : "Inactive"} {formattedCreatedAt} {formattedExpiresAt}
); };