mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-23 10:46:12 +01:00
feat: add sample multi-user support
feat: update README
This commit is contained in:
parent
41f351786f
commit
62d88380e0
19 changed files with 314 additions and 49 deletions
19
client/src/store/userReducer.js
Normal file
19
client/src/store/userReducer.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = {
|
||||
user: null,
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
name: 'user',
|
||||
initialState,
|
||||
reducers: {
|
||||
setUser: (state, action) => {
|
||||
state.user = action.payload;
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
export const { setUser } = currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue