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.
outline/app/scenes/Document/KeyedDocument.js

17 lines
367 B
JavaScript
Raw Normal View History

// @flow
import * as React from 'react';
import { inject } from 'mobx-react';
import Document from '.';
class KeyedDocument extends React.Component<*> {
componentWillUnmount() {
this.props.ui.clearActiveDocument();
}
render() {
return <Document key={this.props.location.pathname} {...this.props} />;
}
}
export default inject('ui')(KeyedDocument);