Skip to content

Commit

Permalink
Merge pull request #15 from yun-cheng/feat/data-loading-skeleton
Browse files Browse the repository at this point in the history
fix(FollowSection): show skeleton only while fetching data
  • Loading branch information
yun-cheng authored Mar 22, 2024
2 parents 68af1cc + c826121 commit 16343de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/follow/FollowSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function FollowSection(): ReactElement {
className='w-full overflow-y-auto py-4 pl-4 pr-[9px]'
>
{data?.map(user => <FollowUserItem key={user.id} user={user} />)}
{!isFetching &&
{!!isFetching &&
Array.from({ length: 10 }).map((_, index) => (
// eslint-disable-next-line react/no-array-index-key
<FollowUserItemSkeleton key={index} />
Expand Down

0 comments on commit 16343de

Please sign in to comment.