Skip to content

Commit

Permalink
Add Suspense around slow component
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarah committed Oct 5, 2023
1 parent 4a53e34 commit d292a0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export default function CommunityCard({community, locale}: CommunityCardProps) {
</Suspense>
</div>
<div className="w-1/2 p-4">
<ObjectListCount communityId={community.id} locale={locale} />
<Suspense>
<ObjectListCount communityId={community.id} locale={locale} />
</Suspense>
</div>
</div>
</Link>
Expand Down
2 changes: 2 additions & 0 deletions apps/researcher/src/lib/community.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export async function getCommunities({
includeMembersCount: true,
});

console.log(communities);

return sort(communities, sortBy);
}

Expand Down

0 comments on commit d292a0c

Please sign in to comment.