123456789101112131415161718192021222324252627282930313233 |
- import {Component} from 'react';
- import {withRouter, WithRouterProps} from 'react-router';
- import {setLastRoute} from 'app/actionCreators/navigation';
- import {setActiveProject} from 'app/actionCreators/projects';
- type Props = WithRouterProps;
- class OrganizationRoot extends Component<Props> {
- componentDidMount() {
- setActiveProject(null);
- }
- componentWillUnmount() {
- const {location} = this.props;
- const {pathname, search} = location;
-
- setLastRoute(`${pathname}${search || ''}`);
- }
- render() {
- return this.props.children;
- }
- }
- export {OrganizationRoot};
- export default withRouter(OrganizationRoot);
|