logout, hover transition and small fixes

This commit is contained in:
kurpfish
2021-08-09 15:10:12 +03:00
parent 5880137dd8
commit f0a92fd8f2
20 changed files with 218 additions and 39 deletions

21
src/redux/loaderSlice.js Normal file
View 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;