mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-09-11 06:35:24 +03:00
Using constant for normal mode on step 0
This commit is contained in:
parent
b1b7062859
commit
d54100e129
@ -1,6 +1,7 @@
|
||||
import React, { useReducer } from 'react'
|
||||
import merge from 'lodash.merge'
|
||||
import Context from '../context'
|
||||
import { modes } from '../constants'
|
||||
|
||||
const reducer = (state, next) =>
|
||||
typeof next === 'function'
|
||||
@ -9,7 +10,7 @@ const reducer = (state, next) =>
|
||||
|
||||
export default props => {
|
||||
const [state, setState] = useReducer(reducer, {
|
||||
mode: 'normal',
|
||||
mode: modes.normal,
|
||||
step: 0,
|
||||
metadata: {},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user