Sets initial value of date in the store
This commit is contained in:
+2
-1
@@ -1,8 +1,9 @@
|
|||||||
import { createSlice } from 'redux-starter-kit'
|
import { createSlice } from 'redux-starter-kit'
|
||||||
|
import { LocalDate } from 'js-joda'
|
||||||
|
|
||||||
const dateSlice = createSlice({
|
const dateSlice = createSlice({
|
||||||
slice: 'date',
|
slice: 'date',
|
||||||
initialState: null,
|
initialState: LocalDate.now().toString(),
|
||||||
reducers: {
|
reducers: {
|
||||||
setDate: (state, action) => action.payload
|
setDate: (state, action) => action.payload
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user