w-aura/src/store/birthtime.ts
Aidar Shaikhutdin @makeweb.space ffeb365e8d fix: date time picker bugs has fixed
2023-05-08 20:47:21 +06:00

21 lines
456 B
TypeScript

import { createSlice } from '@reduxjs/toolkit'
import type { PayloadAction } from '@reduxjs/toolkit'
const birthtimeSlice = createSlice({
name: 'birthtime',
initialState: '12:00',
reducers: {
update(state, action: PayloadAction<string>) {
state = action.payload
return state
},
clear(state) {
state = ''
return state
},
},
})
export const { actions } = birthtimeSlice
export default birthtimeSlice.reducer