index.tsx 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  2. import type {Project} from 'sentry/types/project';
  3. import {SourceMapsDetails} from './sourceMapsDetails';
  4. import {SourceMapsList} from './sourceMapsList';
  5. type Props = RouteComponentProps<{
  6. orgId: string;
  7. projectId: string;
  8. bundleId?: string;
  9. name?: string;
  10. }> & {
  11. children: React.ReactNode;
  12. project: Project;
  13. };
  14. export default function ProjectSourceMapsContainer({params, location, ...props}: Props) {
  15. if (params.bundleId) {
  16. return (
  17. <SourceMapsDetails
  18. {...props}
  19. location={location}
  20. params={{...params, bundleId: params.bundleId}}
  21. />
  22. );
  23. }
  24. return (
  25. <SourceMapsList
  26. {...props}
  27. location={location}
  28. params={{...params, bundleId: params.bundleId}}
  29. />
  30. );
  31. }