import { createSlice } from '@reduxjs/toolkit' import type { PayloadAction } from '@reduxjs/toolkit' const birthdateSlice = createSlice({ name: 'birthdate', initialState: '', reducers: { update(state, action: PayloadAction) { state = action.payload return state }, clear(state) { state = '' return state }, }, }) export const { actions } = birthdateSlice export default birthdateSlice.reducer