forked from thirdweb-example/marketplace-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only display the profile for now so you can see what you have
- Loading branch information
Showing
6 changed files
with
29 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
"use client"; | ||
|
||
import { Collection } from "@/components/collection-page/Collection"; | ||
import MarketplaceProvider from "@/hooks/useMarketplaceContext"; | ||
|
||
import { ProfileSection } from "@/components/profile-page/Profile"; | ||
import { client } from "@/consts/client"; | ||
import { Box, Flex, Heading } from "@chakra-ui/react"; | ||
import { useEffect } from "react"; | ||
import { useActiveAccount, useConnectModal } from "thirdweb/react"; | ||
|
||
const Page = () => { | ||
const account = useActiveAccount(); | ||
const { connect } = useConnectModal(); | ||
useEffect(() => { | ||
if (!account) { | ||
connect({ client }); | ||
} | ||
}, [account, connect]); | ||
if (!account) | ||
return ( | ||
<Box> | ||
<Flex> | ||
<Heading m="auto">Log in to continue</Heading> | ||
</Flex> | ||
</Box> | ||
); | ||
return <ProfileSection address={account.address} />; | ||
}; | ||
|
||
export default function CollectionPage() { | ||
return ( | ||
<MarketplaceProvider | ||
chainId="98985" | ||
contractAddress="0xbcA5Ebd414b7c695A8db400Df231fA2A35bbD441" | ||
> | ||
<Collection /> | ||
<Page /> | ||
</MarketplaceProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters