index.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import {useEffect} from 'react';
  2. import {RouteComponentProps} from 'react-router';
  3. // import {Organization, PageFilters, Project} from 'sentry/types';
  4. import useOrganization from 'sentry/utils/useOrganization';
  5. // import usePageFilters from 'sentry/utils/usePageFilters';
  6. // import useProjects from 'sentry/utils/useProjects';
  7. // import useRouter from 'sentry/utils/useRouter';
  8. import Header from '../components/header';
  9. type RouteParams = {
  10. orgId: string;
  11. };
  12. type Props = RouteComponentProps<RouteParams, {}> & {};
  13. function ReleaseThresholdList({router}: Props) {
  14. const organization = useOrganization();
  15. useEffect(() => {
  16. const hasV2ReleaseUIEnabled = organization.features.includes('release-ui-v2');
  17. if (!hasV2ReleaseUIEnabled) {
  18. router.replace('/releases/');
  19. }
  20. }, [router, organization]);
  21. // const {projects, initiallyLoaded: projectsLoaded} = useProjects();
  22. // const {selection, isReady, desyncedFilters} = usePageFilters();
  23. return (
  24. <div>
  25. <Header router={router} hasV2ReleaseUIEnabled />
  26. </div>
  27. );
  28. }
  29. export default ReleaseThresholdList;