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:
parent
3b996408a6
commit
73f17ff1b3
@ -76,6 +76,6 @@ export default props => {
|
||||
return () => {
|
||||
window.removeEventListener('keydown', handler)
|
||||
}
|
||||
}, [])
|
||||
}, [props.metadata])
|
||||
return false
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user