Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update GlobeSessions component to conditionally render 'Load more' button based on expanded state

Bill Yanga3faedf9e11c
diff --git a/client/src/app/[site]/globe/components/GlobeSessions.tsx b/client/src/app/[site]/globe/components/GlobeSessions.tsx
index d4d4e4ab6..334d4455f 100644
--- a/client/src/app/[site]/globe/components/GlobeSessions.tsx
+++ b/client/src/app/[site]/globe/components/GlobeSessions.tsx
@@ -197,7 +197,7 @@ export function GlobeSessions() {
{isFetchingNextPage && <SessionCardSkeleton />}
</div>
{/* Load more button */}
- {hasNextPage && !isLoading && (
+ {hasNextPage && expanded && !isLoading && (
<Button onClick={() => fetchNextPage()} className="w-full" variant="ghost" size="sm">
Load more
</Button>