import {Fragment} from 'react'; import LoadingError from 'sentry/components/loadingError'; import LoadingIndicator from 'sentry/components/loadingIndicator'; import {t} from 'sentry/locale'; import {useApiQuery} from 'sentry/utils/queryClient'; type Data = { extensions: [key: string, value: string][]; modules: [key: string, value: string][]; }; export default function AdminPackages() { const {data, isLoading, isError} = useApiQuery(['/internal/packages/'], { staleTime: 0, }); if (isError) { return ; } if (isLoading) { return ; } return (

{t('Extensions')}

{data?.extensions && data?.extensions.length > 0 ? (
{data?.extensions.map(([key, value]) => (
{key}
{value}
))}
) : (

{t('No extensions registered')}

)}

{t('Modules')}

{data?.modules && data?.modules.length > 0 ? (
{data?.modules.map(([key, value]) => (
{key}
{value}
))}
) : (

{t('No modules registered')}

)}
); }