Skip to content
Snippets Groups Projects
Commit 397d526c authored by Ben Wheeler's avatar Ben Wheeler
Browse files

updated hash-parser-hoc per linda's code to block modal

parent 719c2e9d
Branches
Tags
No related merge requests found
......@@ -20,6 +20,9 @@ const HashParserHOC = function (WrappedComponent) {
bindAll(this, [
'handleHashChange'
]);
this.state = {
hideIntro: false
};
}
componentDidMount () {
window.addEventListener('hashchange', this.handleHashChange);
......@@ -42,6 +45,9 @@ const HashParserHOC = function (WrappedComponent) {
if (hashProjectId !== this.props.reduxProjectId) {
this.props.setHashProjectId(hashProjectId);
}
if (hashProjectId !== defaultProjectId) {
this.setState({hideIntro: true});
}
}
render () {
const {
......@@ -54,7 +60,7 @@ const HashParserHOC = function (WrappedComponent) {
} = this.props;
return (
<WrappedComponent
hideIntro={this.state.projectId && this.state.projectId !== 0}
hideIntro={this.state.hideIntro}
{...componentProps}
/>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment