Implement video feed feature with components, hooks, and utility functions
This commit is contained in:
@@ -7,6 +7,7 @@ export const useSightingList = () => {
|
||||
const { videoFeedQuery } = useVideoFeed();
|
||||
const latestSighting = videoFeedQuery?.data;
|
||||
const lastProcessedRef = useRef<number>(-1);
|
||||
const isLoading = videoFeedQuery?.isPending;
|
||||
|
||||
useEffect(() => {
|
||||
if (!latestSighting || latestSighting.ref === undefined || latestSighting.ref === -1) return;
|
||||
@@ -22,5 +23,5 @@ export const useSightingList = () => {
|
||||
});
|
||||
}
|
||||
}, [latestSighting, latestSighting?.ref]);
|
||||
return { sightingList };
|
||||
return { sightingList, isLoading };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user