index.tsx 840 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. {
  7. orgId: string;
  8. projectId: string;
  9. bundleId?: string;
  10. name?: string;
  11. },
  12. {}
  13. > & {
  14. children: React.ReactNode;
  15. project: Project;
  16. };
  17. export default function ProjectSourceMapsContainer({params, location, ...props}: Props) {
  18. if (params.bundleId) {
  19. return (
  20. <SourceMapsDetails
  21. {...props}
  22. location={location}
  23. params={{...params, bundleId: params.bundleId}}
  24. />
  25. );
  26. }
  27. return (
  28. <SourceMapsList
  29. {...props}
  30. location={location}
  31. params={{...params, bundleId: params.bundleId}}
  32. />
  33. );
  34. }