We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76b7efd commit 85007c0Copy full SHA for 85007c0
src/redux/neurojson/neurojson.slice.ts
@@ -29,9 +29,11 @@ const neurojsonSlice = createSlice({
29
state.loading = false;
30
state.hasMore = true; // Reset pagination availability
31
},
32
+ setLoading: (state, action: PayloadAction<boolean>) => {
33
+ state.loading = action.payload;
34
+ },
35
36
extraReducers: (builder) => {
- // Handle paginated data loading
37
builder
38
.addCase(loadPaginatedData.pending, (state) => {
39
state.loading = true;
@@ -98,6 +100,6 @@ const neurojsonSlice = createSlice({
98
100
99
101
});
102
-export const { resetData } = neurojsonSlice.actions;
103
+export const { resetData, setLoading } = neurojsonSlice.actions;
104
105
export default neurojsonSlice.reducer;
0 commit comments