logout, hover transition and small fixes
This commit is contained in:
21
src/redux/loaderSlice.js
Normal file
21
src/redux/loaderSlice.js
Normal file
@ -0,0 +1,21 @@
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
|
||||
const initialState = {
|
||||
isLoading: false,
|
||||
};
|
||||
|
||||
export const loaderSlice = createSlice({
|
||||
name: 'loader',
|
||||
initialState,
|
||||
reducers: {
|
||||
loading: (state, action) => {
|
||||
state.isLoading = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { loading } = loaderSlice.actions;
|
||||
|
||||
export const selectIsLoading = (state) => state.loader.isLoading;
|
||||
|
||||
export default loaderSlice.reducer;
|
Reference in New Issue
Block a user