Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions frontend/src/hooks/useCachedData.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function useCachedData(
const [source, setSource] = useState('cache');
const [metadata, setMetadata] = useState(null);
const cancelledRef = useRef(false);
const timeoutIdRef = useRef(null);

const fetchWithTimeout = useCallback(async () => {
return Promise.race([
Expand Down Expand Up @@ -99,11 +98,8 @@ export function useCachedData(
loadData();
return () => {
cancelledRef.current = true;
if (timeoutIdRef.current) {
clearTimeout(timeoutIdRef.current);
}
};
}, [cacheKey, fetchWithTimeout]);
}, [loadData]);

return {
data,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/usePaginatedEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function usePaginatedEvents() {
return () => {
cancelledRef.current = true;
};
}, []);
}, [loadPage]);

const cursor = createCursorFromPosition(events, Math.min(PAGE_SIZE - 1, events.length - 1));

Expand Down
Loading