import {Fragment} from 'react'; import {t} from 'sentry/locale'; import DeprecatedAsyncView from 'sentry/views/deprecatedAsyncView'; type Data = { extensions: [key: string, value: string][]; modules: [key: string, value: string][]; }; type State = DeprecatedAsyncView['state'] & {data: Data}; export default class AdminPackages extends DeprecatedAsyncView<{}, State> { getEndpoints(): ReturnType { return [['data', '/internal/packages/']]; } renderBody() { const {data} = this.state; const {extensions, modules} = data; return (

{t('Extensions')}

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

{t('No extensions registered')}

)}

{t('Modules')}

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

{t('No modules registered')}

)}
); } }