diff --git a/CHANGELOG.md b/CHANGELOG.md index 177079e..97a176a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ - Refactor localStorage to use hooks #334 - Refactor keyboard shortcuts #335 - Refactor query string to use hooks #336 +- Refactor to use hooks #337 + - Adds `MDXDeckState` provider component + - Fixes an issue with rerenders in Gatsby theme + - Adjusts styles in grid mode + - Refactors `useSteps` to use effect hook ## v2.2.3 2019-04-20 diff --git a/packages/components/src/MDXDeck.js b/packages/components/src/MDXDeck.js index a21cd27..d3f76d8 100644 --- a/packages/components/src/MDXDeck.js +++ b/packages/components/src/MDXDeck.js @@ -15,6 +15,7 @@ import GoogleFonts from './GoogleFonts' import Catch from './Catch' import Keyboard from './Keyboard' import Storage from './Storage' +import QueryString from './QueryString' import Style from './Style' const NORMAL = 'normal' @@ -106,7 +107,8 @@ export const MDXDeck = props => { const goto = nextIndex => { const current = getIndex(props) const reverse = nextIndex < current - navigate(basepath + '/' + nextIndex) + const { search } = globalHistory.location + navigate(basepath + '/' + nextIndex + search) const meta = getMeta(nextIndex) setState({ step: reverse ? meta.steps || 0 : 0, @@ -157,6 +159,7 @@ export const MDXDeck = props => {