Feat:Added slice to re-render file table on every file uplaod and folder creation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const initialState = {
|
||||
isUploading: false,
|
||||
};
|
||||
|
||||
const uploadStatusSlice = createSlice({
|
||||
name: "uploadStatus",
|
||||
initialState,
|
||||
reducers: {
|
||||
setIsUploading: (state) => {
|
||||
state.isUploading = !state.isUploading;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setIsUploading } = uploadStatusSlice.actions;
|
||||
export default uploadStatusSlice.reducer;
|
||||
Reference in New Issue
Block a user