feat: settings & solid login

This commit is contained in:
zerosoul
2022-02-27 12:30:14 +08:00
parent 0394c99292
commit f7634a59cd
35 changed files with 1552 additions and 246 deletions
+14 -1
View File
@@ -14,6 +14,14 @@ const channelsSlice = createSlice({
})
);
},
updateChannel(state, action) {
// console.log("set channels store", action);
const { id, name, description } = action.payload;
const oObj = state[id];
const newObj = { ...oObj, name, description };
state[id] = newObj;
},
addChannel(state, action) {
// console.log("set channels store", action);
const ch = action.payload;
@@ -32,5 +40,10 @@ const channelsSlice = createSlice({
// },
},
});
export const { setChannels, addChannel, deleteChannel } = channelsSlice.actions;
export const {
setChannels,
addChannel,
deleteChannel,
updateChannel,
} = channelsSlice.actions;
export default channelsSlice.reducer;