fix: tab in license page aligned properly (#4006)

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Joe Milton 2023-11-21 13:49:51 +05:30 committed by GitHub
parent e58ecff19b
commit 84f2885533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,14 +7,14 @@ import ApplyLicenseForm from './ApplyLicenseForm';
import ListLicenses from './ListLicenses'; import ListLicenses from './ListLicenses';
function Licenses(): JSX.Element { function Licenses(): JSX.Element {
const { t } = useTranslation(['licenses']); const { t, ready: translationsReady } = useTranslation(['licenses']);
const { data, isError, isLoading, refetch } = useLicense(); const { data, isError, isLoading, refetch } = useLicense();
if (isError || data?.error) { if (isError || data?.error) {
return <Typography>{data?.error}</Typography>; return <Typography>{data?.error}</Typography>;
} }
if (isLoading || data?.payload === undefined) { if (isLoading || data?.payload === undefined || !translationsReady) {
return <Spinner tip={t('loading_licenses')} height="90vh" />; return <Spinner tip={t('loading_licenses')} height="90vh" />;
} }