Skip to content

Commit

Permalink
troubleshoot nft acheivement section loading state
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPereira committed Jan 7, 2024
1 parent a82ea8d commit 85f0c1c
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions packages/nextjs/components/portfolio/sections/Achievements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,21 @@ export function Achievements() {
console.log("nfts", nfts);

if (nftsError) {
console.log("nftsError");
return <div>Error loading achievement NFTs</div>;
console.error("nftsError", nftsError);
return (
<SectionContainer>
<SectionHeader title="Achievements" />
<div>Error loading achievement NFTs</div>
</SectionContainer>
);
}

return (
<SectionContainer>
<SectionHeader title="Achievements" />
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-8 rounded-xl">
{nfts.data &&
nfts.data.map((nft: any, idx: number) => (
{nfts?.data ? (
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-8 rounded-xl">
{nfts.data.map((nft: any, idx: number) => (
<div
key={idx}
className="flex flex-col items-center justify-center border border-base-content rounded-xl p-3 bg-base-200"
Expand All @@ -27,7 +32,12 @@ export function Achievements() {
<p className="text-xl">{nft.name}</p>
</div>
))}
</div>
</div>
) : (
<div>
<div className="text-center">Fetching NFT acheivements...</div>
</div>
)}
</SectionContainer>
);
}

1 comment on commit 85f0c1c

@vercel
Copy link

@vercel vercel bot commented on 85f0c1c Jan 7, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

matt-pereira – ./

matt-pereira-mattpereira.vercel.app
matt-pereira-git-main-mattpereira.vercel.app
matt-pereira.vercel.app

Please sign in to comment.