organizationRoot.tsx 507 B

12345678910111213141516171819
  1. import {Fragment, useEffect} from 'react';
  2. import {setActiveProject} from 'sentry/actionCreators/projects';
  3. type Props = {children: React.ReactChildren};
  4. /**
  5. * This is the parent container for organization-level views such
  6. * as the Dashboard, Stats, Activity, etc...
  7. *
  8. * Currently is just used to unset active project
  9. */
  10. function OrganizationRoot({children}: Props) {
  11. useEffect(() => void setActiveProject(null), []);
  12. return <Fragment>{children}</Fragment>;
  13. }
  14. export default OrganizationRoot;