Skip to content

Commit

Permalink
feat: add tags shimmer (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Sep 2, 2022
1 parent 50504f9 commit bba58d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/Home/Trending.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { gql, useQuery } from '@apollo/client';
import UserProfileShimmer from '@components/Shared/Shimmer/UserProfileShimmer';
import TrendingTagShimmer from '@components/Shared/Shimmer/TrendingTagShimmer';
import { Card, CardBody } from '@components/UI/Card';
import { ErrorMessage } from '@components/UI/ErrorMessage';
import { TagResult, TagSortCriteria } from '@generated/types';
Expand Down Expand Up @@ -41,11 +41,13 @@ const Trending: FC = () => {
<Title />
<Card className="mb-4">
<CardBody className="space-y-4">
<UserProfileShimmer showFollow />
<UserProfileShimmer showFollow />
<UserProfileShimmer showFollow />
<UserProfileShimmer showFollow />
<UserProfileShimmer showFollow />
<TrendingTagShimmer />
<TrendingTagShimmer />
<TrendingTagShimmer />
<TrendingTagShimmer />
<TrendingTagShimmer />
<TrendingTagShimmer />
<TrendingTagShimmer />
</CardBody>
</Card>
</>
Expand Down
12 changes: 12 additions & 0 deletions src/components/Shared/Shimmer/TrendingTagShimmer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { FC } from 'react';

const TrendingTagShimmer: FC = () => {
return (
<div className="py-1 space-y-3">
<div className="w-3/5 h-3 rounded-lg shimmer" />
<div className="w-2/5 h-2.5 rounded-lg shimmer" />
</div>
);
};

export default TrendingTagShimmer;

1 comment on commit bba58d1

@vercel
Copy link

@vercel vercel bot commented on bba58d1 Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.