nicolium: fix for useTimeline loading state
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -117,8 +117,6 @@ const useTimeline = (
|
||||
|
||||
useTimelineStream(streamConfig?.stream ?? '', streamConfig?.params, !!streamConfig?.stream);
|
||||
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
const query = useQuery({
|
||||
queryKey,
|
||||
queryFn: async () => {
|
||||
@ -133,6 +131,8 @@ const useTimeline = (
|
||||
},
|
||||
});
|
||||
|
||||
const [isLoading, setIsLoading] = useState(query.isPending);
|
||||
|
||||
const handleLoadMore = useCallback(
|
||||
async (entry: TimelineEntry) => {
|
||||
if (isLoading) return;
|
||||
|
||||
Reference in New Issue
Block a user