1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-29 13:58:02 +03:00

Adjust next previous methods

This commit is contained in:
Brent Jackson 2019-04-20 15:37:34 -04:00
parent 3b996408a6
commit 73f17ff1b3
2 changed files with 2 additions and 4 deletions

View File

@ -76,6 +76,6 @@ export default props => {
return () => {
window.removeEventListener('keydown', handler)
}
}, [])
}, [props.metadata])
return false
}

View File

@ -70,7 +70,6 @@ export const MDXDeck = props => {
const index = getIndex(props)
const getMeta = i => {
console.log('getMeta', i, state.metadata)
return state.metadata[i] || {}
}
@ -80,7 +79,7 @@ export const MDXDeck = props => {
...state.metadata,
[index]: {
...state.metadata[index],
meta,
...meta,
},
},
})
@ -124,7 +123,6 @@ export const MDXDeck = props => {
...state,
update: setState,
register,
index,
modes,
goto,
previous,