import { faCircleCheck, faCircleXmark,faFileInvoice } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { EmptyState, Table, TableContainer, TableSkeleton, TBody, Td, Th, THead, Tr} from "@app/components/v2"; import { useOrganization } from "@app/context"; import { useGetOrgPlanTable } from "@app/hooks/api"; export const CurrentPlanSection = () => { const { currentOrg } = useOrganization(); const { data, isLoading } = useGetOrgPlanTable(currentOrg?._id ?? ""); const displayCell = (value: null | number | string | boolean) => { if (value === null) return "-"; if (typeof value === "boolean") { if (value) return ( ); return ( ); } return value; } return (

Current Usage

{!isLoading && data && data?.rows?.length > 0 && data.rows.map(({ name, allowed, used }) => { return ( ); })} {isLoading && } {!isLoading && data && data?.rows?.length === 0 && ( )}
Feature Allowed Used
{name} {displayCell(allowed)} {used}
); }