index.tsx 784 B

1234567891011121314151617181920212223
  1. import {RouteComponentProps} from 'react-router';
  2. import {Project} from 'sentry/types';
  3. import useOrganization from 'sentry/utils/useOrganization';
  4. import ProjectSourceMapsList from 'sentry/views/settings/projectSourceMaps/list';
  5. import {ProjectSourceMaps} from 'sentry/views/settings/projectSourceMaps/projectSourceMaps';
  6. type Props = RouteComponentProps<{projectId: string}, {}> & {
  7. children: React.ReactNode;
  8. project: Project;
  9. };
  10. export function ProjectSourceMapsContainer(props: Props) {
  11. const organization = useOrganization();
  12. const sourceMapsDebugIds = organization.features.includes('source-maps-debug-ids');
  13. if (sourceMapsDebugIds) {
  14. return <ProjectSourceMaps {...props} />;
  15. }
  16. return <ProjectSourceMapsList {...props} organization={organization} />;
  17. }