This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/components/SidebarHidden/SidebarHidden.js
Tom Moor 1c83257483 Restore New Document Functionality (#94)
* Restored New Document functionality

* Declarative SidebarHidden

* Fix edit route
2017-07-04 23:02:06 -07:00

26 lines
458 B
JavaScript

// @flow
import { Component } from 'react';
import { inject } from 'mobx-react';
import UiStore from 'stores/UiStore';
class SidebarHidden extends Component {
props: {
ui: UiStore,
children: React$Element<any>,
};
componentDidMount() {
this.props.ui.enableEditMode();
}
componentWillUnmount() {
this.props.ui.disableEditMode();
}
render() {
return this.props.children;
}
}
export default inject('ui')(SidebarHidden);