index.tsx 766 B

12345678910111213141516171819202122232425262728
  1. import type {RouteComponentProps} from 'react-router';
  2. import type {Project} from 'sentry/types';
  3. import {ProjectSourceMaps} from './projectSourceMaps';
  4. import {ProjectSourceMapsArtifacts} from './projectSourceMapsArtifacts';
  5. type Props = RouteComponentProps<
  6. {orgId: string; projectId: string; bundleId?: string; name?: string},
  7. {}
  8. > & {
  9. children: React.ReactNode;
  10. project: Project;
  11. };
  12. export default function ProjectSourceMapsContainer({params, location, ...props}: Props) {
  13. if (params.bundleId) {
  14. return (
  15. <ProjectSourceMapsArtifacts
  16. {...props}
  17. location={location}
  18. params={{...params, bundleId: params.bundleId}}
  19. />
  20. );
  21. }
  22. return <ProjectSourceMaps {...props} location={location} params={params} />;
  23. }