import {Fragment} from 'react'; import {t} from 'sentry/locale'; import AsyncView from 'sentry/views/asyncView'; type Data = { extensions: [key: string, value: string][]; modules: [key: string, value: string][]; }; type State = AsyncView['state'] & {data: Data}; export default class AdminPackages extends AsyncView<{}, 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')}

)}
); } }