Files
sentinel/static/app/views/organizationRoot.tsx
2024-02-15 17:01:50 +00:00

20 lines
503 B
TypeScript

import {Fragment, useEffect} from 'react';
import {setActiveProject} from 'sentry/actionCreators/projects';
type Props = {children: React.ReactNode};
/**
* This is the parent container for organization-level views such
* as the Dashboard, Stats, Activity, etc...
*
* Currently is just used to unset active project
*/
function OrganizationRoot({children}: Props) {
useEffect(() => void setActiveProject(null), []);
return <Fragment>{children}</Fragment>;
}
export default OrganizationRoot;