Skip to content

Commit

Permalink
narrative: leave narrative
Browse files Browse the repository at this point in the history
Clicking on "Leave the narrative & explore the data yourself" completely
leaves the narrative and goes to the dataset page.
  • Loading branch information
joverlee521 committed Feb 1, 2020
1 parent 645dbe2 commit d172a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/narrative/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './styles';
import ReactPageScroller from "./ReactPageScroller";
import { changePage, EXPERIMENTAL_showMainDisplayMarkdown } from "../../actions/navigation";
import { CHANGE_URL_QUERY_BUT_NOT_REDUX_STATE, TOGGLE_NARRATIVE } from "../../actions/types";
import { CHANGE_URL_QUERY_BUT_NOT_REDUX_STATE } from "../../actions/types";
import { narrativeNavBarHeight } from "../../util/globals";

/* regarding refs: https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components */
Expand All @@ -41,7 +41,7 @@ class Narrative extends React.Component {
super(props);
this.state = {showingEndOfNarrativePage: false};
this.exitNarrativeMode = () => {
this.props.dispatch({type: TOGGLE_NARRATIVE, display: false});
this.props.dispatch(changePage({ path: this.props.blocks[0].dataset, query: true }));
};
this.changeAppStateViaBlock = (reactPageScrollerIdx) => {
const idx = reactPageScrollerIdx-1;
Expand Down

0 comments on commit d172a9a

Please sign in to comment.