Notification for header

This commit was merged in pull request #339.
This commit is contained in:
2023-07-20 10:22:10 +01:00
parent 5257f89acb
commit 87f1a1e3e8
10 changed files with 362 additions and 326 deletions
+22
View File
@@ -0,0 +1,22 @@
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
notifications: {
loading: false,
data: null,
},
};
export const notificationsSlice = createSlice({
name: "notifications",
initialState,
reducers: {
updateNotifications: (state, action) => {
state.notifications = { ...action.payload };
},
},
});
export const { updateNotifications } = notificationsSlice.actions;
export default notificationsSlice.reducer;