forked from juusokaj/reguide_nft_marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuy.tsx
27 lines (25 loc) · 889 Bytes
/
buy.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
import { useContract, useNFTs } from "@thirdweb-dev/react";
import React from "react";
import Container from "../components/Container/Container";
import NFTGrid from "../components/NFT/NFTGrid";
import { NFT_COLLECTION_ADDRESS } from "../const/contractAddresses";
export default function Buy() {
// Load all of the NFTs from the NFT Collection
const { contract } = useContract(NFT_COLLECTION_ADDRESS);
const { data, isLoading } = useNFTs(contract);
return (
<Container maxWidth="lg">
<div>
<h1>Buy NFTs</h1>
<p>Browse which NFTs are available from the collection.</p>
</div>
<NFTGrid
data={data}
isLoading={isLoading}
emptyText={
"Looks like there are no NFTs in this collection. Did you import your contract on the thirdweb dashboard? https://thirdweb.com/dashboard"
}
/>
</Container>
);
}