Skip to content

Commit

Permalink
wip: add toggle narrative functionality (add before refactor)
Browse files Browse the repository at this point in the history
  • Loading branch information
kairstenfay committed Jan 29, 2020
1 parent f4db3fb commit 408c5d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/narrative/MobileNarrativeDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { connect } from "react-redux";
import queryString from "query-string";
import { changePage, EXPERIMENTAL_showMainDisplayMarkdown } from "../../actions/navigation";
import { TOGGLE_NARRATIVE } from "../../actions/types";
import {
linkStyles,
MobileBannerTop,
Expand Down Expand Up @@ -37,6 +38,9 @@ class MobileNarrativeDisplay extends React.Component {
this.state = {
showingEndOfNarrativePage: false
};
this.exitNarrativeMode = () => {
this.props.dispatch({type: TOGGLE_NARRATIVE, display: false});
};
this.goToNextPage = () => {
if (this.state.showingEndOfNarrativePage) return; // no-op
if (this.props.currentInFocusBlockIdx+1 === this.props.blocks.length) {
Expand Down

0 comments on commit 408c5d0

Please sign in to comment.