feat: Created Course updates page (#581)
This commit is contained in:
5
src/generic/processing-notification/data/selectors.js
Normal file
5
src/generic/processing-notification/data/selectors.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const getProcessingNotification = (state) => ({
|
||||
isShow: state.processingNotification.isShow,
|
||||
title: state.processingNotification.title,
|
||||
});
|
||||
28
src/generic/processing-notification/data/slice.js
Normal file
28
src/generic/processing-notification/data/slice.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = {
|
||||
isShow: false,
|
||||
title: '',
|
||||
};
|
||||
|
||||
const slice = createSlice({
|
||||
name: 'processingNotification',
|
||||
initialState,
|
||||
reducers: {
|
||||
showProcessingNotification: (state, { payload }) => {
|
||||
state.isShow = true;
|
||||
state.title = payload;
|
||||
},
|
||||
hideProcessingNotification: () => initialState,
|
||||
},
|
||||
});
|
||||
|
||||
export const {
|
||||
showProcessingNotification,
|
||||
hideProcessingNotification,
|
||||
} = slice.actions;
|
||||
|
||||
export const {
|
||||
reducer,
|
||||
} = slice;
|
||||
Reference in New Issue
Block a user