Skip to content

Commit

Permalink
Update indexSlice.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 27, 2024
1 parent 3ab5701 commit 086c571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web-app/src/store/slices/indexSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const indexSlice = createSlice({
state.loading = true;
})
.addCase(fetchIndex.fulfilled, (state, action) => {
// state.loading = false;
state.loading = false;
state.data = action.payload;
})
.addCase(fetchIndex.rejected, (state, action) => {
Expand Down Expand Up @@ -80,6 +80,7 @@ const indexSlice = createSlice({
})
.addCase(addItem.fulfilled, (state, action) => {
state.items.data.push(action.payload);
state.data.hasItems = true;
state.addItemLoading = false;
})
.addCase(addItem.rejected, (state, action) => {
Expand Down

0 comments on commit 086c571

Please sign in to comment.