[Glitch] Fix directory showing load more button when no more profiles exist

Port 93f5ed0fce to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Heath Dutton🕴️ authored and Claire committed 2026-01-16 22:31:54 +01:00
1 parent b6b6e142ba
commit edf50bd073
3 files changed
+15 -7

No files matched your search

@@ -86,6 +86,9 @@ export const Directory: React.FC<{
(state) =>
state.user_lists.getIn(['directory', 'isLoading'], true) as boolean,
);
const hasMore = useAppSelector(
(state) => !!state.user_lists.getIn(['directory', 'next']),
);
useEffect(() => {
void dispatch(fetchDirectory({ order, local }));
@@ -185,7 +188,7 @@ export const Directory: React.FC<{
<LoadMore
onClick={handleLoadMore}
visible={!initialLoad}
visible={!initialLoad && hasMore}
loading={isLoading}
/>
</div>