Skip to content

Commit

Permalink
narratives: hide explore data button for markdown
Browse files Browse the repository at this point in the history
When the narrative page is the MainDisplayMarkdown, we don't have
any data, so hide the "Explore the data yourself" button.
  • Loading branch information
joverlee521 committed Jan 31, 2020
1 parent 31771d0 commit 645dbe2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ class Main extends React.Component {
navBarHandler={() => {this.setState({sidebarOpen: !this.state.sidebarOpen});}}
/>
<PanelsContainer width={availableWidth} height={availableHeight} left={this.state.sidebarOpen ? sidebarWidth : 0}>
{this.props.narrativeIsLoaded ? renderNarrativeToggle(this.props.dispatch, this.props.displayNarrative) : null}
{this.props.narrativeIsLoaded && !this.props.panelsToDisplay.includes("EXPERIMENTAL_MainDisplayMarkdown") ?
renderNarrativeToggle(this.props.dispatch, this.props.displayNarrative) : null
}
{this.props.displayNarrative ? null : <Info width={calcUsableWidth(availableWidth, 1)} />}
{this.props.panelsToDisplay.includes("tree") ? <Tree width={big.width} height={big.height} /> : null}
{this.props.panelsToDisplay.includes("map") ? <Map width={big.width} height={big.height} justGotNewDatasetRenderNewMap={false} /> : null}
Expand Down

0 comments on commit 645dbe2

Please sign in to comment.