forked from thirdweb-example/play-to-earn-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShop.tsx
31 lines (28 loc) · 808 Bytes
/
Shop.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { useNFTs } from "@thirdweb-dev/react";
import { EditionDrop } from "@thirdweb-dev/sdk";
import React from "react";
import styles from "../styles/Home.module.css";
import ShopItem from "./ShopItem";
type Props = {
pickaxeContract: EditionDrop;
};
/**
* This component shows the:
* - All of the available pickaxes from the edition drop and their price.
*/
export default function Shop({ pickaxeContract }: Props) {
const { data: availablePickaxes } = useNFTs(pickaxeContract);
return (
<>
<div className={styles.nftBoxGrid}>
{availablePickaxes?.map((p) => (
<ShopItem
pickaxeContract={pickaxeContract}
item={p}
key={p.metadata.id.toString()}
/>
))}
</div>
</>
);
}