index.tsx 795 B

1234567891011121314151617181920212223242526
  1. import useAllProjectVisibility from 'sentry/utils/project/useAllProjectVisibility';
  2. import useRouteAnalyticsParams from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams';
  3. import withOrganization from 'sentry/utils/withOrganization';
  4. import ProjectDetail from './projectDetail';
  5. function ProjectDetailContainer(
  6. props: Omit<
  7. React.ComponentProps<typeof ProjectDetail>,
  8. 'projects' | 'loadingProjects' | 'selection'
  9. >
  10. ) {
  11. const {getBySlug} = useAllProjectVisibility({});
  12. const project = getBySlug(props.params.projectId);
  13. useRouteAnalyticsParams(
  14. project
  15. ? {
  16. project_id: project.id,
  17. project_platform: project.platform,
  18. }
  19. : {}
  20. );
  21. return <ProjectDetail {...props} />;
  22. }
  23. export default withOrganization(ProjectDetailContainer);