reorganize components and add root import plugin

This commit is contained in:
Danny Avila 2023-02-07 10:26:19 -05:00
parent faf8800e67
commit 9d41ed4615
27 changed files with 76 additions and 27 deletions

24
src/store/convoSlice.js Normal file
View file

@ -0,0 +1,24 @@
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
active: false,
conversationId: null,
parentMessageId: null,
};
const currentSlice = createSlice({
name: 'convo',
initialState,
reducers: {
setConversation: (state, action) => {
const { conversationId, parentMessageId } = action.payload;
state.conversationId = conversationId;
state.parentMessageId = parentMessageId;
},
}
});
//
export const { setConversation } = currentSlice.actions;
export default currentSlice.reducer;