import { Tabs, Typography } from 'antd'; import Spinner from 'components/Spinner'; import useLicense from 'hooks/useLicense'; import { useTranslation } from 'react-i18next'; import ApplyLicenseForm from './ApplyLicenseForm'; import ListLicenses from './ListLicenses'; function Licenses(): JSX.Element { const { t } = useTranslation(['licenses']); const { data, isError, isLoading, refetch } = useLicense(); if (isError || data?.error) { return {data?.error}; } if (isLoading || data?.payload === undefined) { return ; } const allValidLicense = data?.payload?.licenses?.filter((license) => license.isCurrent) || []; const tabs = [ { label: t('tab_current_license'), key: 'licenses', children: , }, { label: t('tab_license_history'), key: 'history', children: , }, ]; return ( ); } export default Licenses;