File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -58,29 +58,6 @@ const neurojsonSlice = createSlice({
5858 state . hasMore =
5959 action . payload . offset + action . payload . rows . length <
6060 action . payload . total_rows ;
61- // Check if we received fewer items than the limit, indicating we've reached the end
62- // console.log(action.payload.total_rows);
63- // state.limit = action.payload.total_rows;
64- // const reachedEnd = action.payload.offset + action.payload.rows.length >= action.payload.total_rows;
65-
66- // Filter out duplicates while preserving order
67- // const uniqueEntries = action.payload.rows.filter(
68- // (newItem) =>
69- // !state.data.some((existingItem) => existingItem.id === newItem.id)
70- // );
71-
72- // state.loading = false;
73-
74- // if (uniqueEntries.length > 0) {
75- // Append new unique entries to existing data
76- // state.data = uniqueEntries; // ✅ Replace instead of append
77- // state.offset = action.payload.offset; // ✅ Track current offset
78- // Only set hasMore to true if we haven't reached the end
79- // state.hasMore = !reachedEnd;
80- // } else {
81- // If no new unique entries were found, we've reached the end
82- // state.hasMore = false;
83- // }
8461 }
8562 )
8663 . addCase ( loadPaginatedData . rejected , ( state , action ) => {
You can’t perform that action at this time.
0 commit comments