Skip to content

Commit

Permalink
fix(user): use statscardcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvdkolk committed Apr 11, 2024
1 parent ee93d6f commit 0df8767
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/pages/user/[id]/[[...deeplink]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { event } from 'nextjs-google-analytics';
import { useScrollPercentage } from '@/hooks/use-scroll-percentage';
import formatter from '@/utils/formatter';
import { SpotifyLink, DiscordLink } from '@/components/SocialLink';
import { StatsCard, StatsCardSkeleton } from '@/components/StatsCard';
import {
MdArrowDropDown,
MdCheck,
Expand Down Expand Up @@ -53,6 +52,7 @@ import { Listbox, Transition } from '@headlessui/react';
import { ImportRequiredScope } from '@/components/User/ImportRequiredScope';
import { UserBanScope } from '@/components/User/UserBanScope';
import { PlusBadge } from '@/components/User/PlusBadge';
import { StatsCardContainer } from '@/components/Stats';

const Chart = dynamic(() => import('react-apexcharts'), { ssr: false });

Expand Down Expand Up @@ -625,17 +625,7 @@ const User: NextPage<Props> = ({
))}
{user.isPlus && (
<ImportRequiredScope value="streamStats">
<ul className="grid w-full grid-cols-2 gap-4 md:w-7/12 md:grid-cols-4">
{stats.length > 0
? stats.map((item, i) => <StatsCard {...item} key={i} />)
: Array(6)
.fill(null)
.map((_n, i) => (
<li key={i}>
<StatsCardSkeleton />
</li>
))}
</ul>
<StatsCardContainer stats={stats} />
</ImportRequiredScope>
)}
</section>
Expand Down

0 comments on commit 0df8767

Please sign in to comment.