mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-21 01:36:13 +01:00
reorganize components and add root import plugin
This commit is contained in:
parent
faf8800e67
commit
9d41ed4615
27 changed files with 76 additions and 27 deletions
18
src/store/messageSlice.js
Normal file
18
src/store/messageSlice.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = [];
|
||||
|
||||
const currentSlice = createSlice({
|
||||
name: 'messages',
|
||||
initialState,
|
||||
reducers: {
|
||||
setMessages: (state, action) => {
|
||||
const { payload } = action;
|
||||
return [...payload];
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
export const { setMessages } = currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue