index.tsx 650 B

123456789101112131415161718192021222324
  1. import * as React from 'react';
  2. import {RouteComponentProps} from 'react-router';
  3. import {Organization, Project} from 'app/types';
  4. import withOrganization from 'app/utils/withOrganization';
  5. type RouteParams = {
  6. orgId: string;
  7. };
  8. type Props = RouteComponentProps<RouteParams, {}> & {
  9. organization: Organization;
  10. project: Project;
  11. children: React.ReactNode;
  12. };
  13. function ProjectSourceMapsContainer(props: Props) {
  14. const {children, organization, project} = props;
  15. return React.isValidElement(children)
  16. ? React.cloneElement(children, {organization, project})
  17. : null;
  18. }
  19. export default withOrganization(ProjectSourceMapsContainer);