2023-02-07 16:22:35 -05:00
|
|
|
import { createSlice } from '@reduxjs/toolkit';
|
|
|
|
|
|
|
|
|
|
const initialState = {
|
|
|
|
|
isSubmitting: false,
|
2023-02-15 12:29:56 -05:00
|
|
|
model: 'bingai'
|
2023-02-07 16:22:35 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const currentSlice = createSlice({
|
|
|
|
|
name: 'submit',
|
|
|
|
|
initialState,
|
|
|
|
|
reducers: {
|
|
|
|
|
setSubmitState: (state, action) => {
|
|
|
|
|
state.isSubmitting = action.payload;
|
|
|
|
|
},
|
2023-02-13 21:15:28 -05:00
|
|
|
setModel: (state, action) => {
|
|
|
|
|
state.model = action.payload;
|
|
|
|
|
},
|
2023-02-07 16:22:35 -05:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-13 21:15:28 -05:00
|
|
|
export const { setSubmitState, setModel } = currentSlice.actions;
|
2023-02-07 16:22:35 -05:00
|
|
|
|
|
|
|
|
export default currentSlice.reducer;
|