import { NextPage, GetServerSideProps } from 'next' import Link from 'next/link' import { Text, Flex, Box, Button, FormatCryptoCurrency, } from 'components/primitives' import Layout from 'components/Layout' import { paths } from '@reservoir0x/reservoir-sdk' import { useContext, useEffect, useState } from 'react' // import { Footer } from 'components/home/Footer' import { useMarketplaceChain, useMounted } from 'hooks' import supportedChains, { DefaultChain } from 'utils/chains' import { Head } from 'components/Head' import { ChainContext } from 'context/ChainContextProvider' import Img from 'components/primitives/Img' import useTopSellingCollections from 'hooks/useTopSellingCollections' import ReactMarkdown from 'react-markdown' import { basicFetcher as fetcher } from 'utils/fetcher' import { styled } from 'stitches.config' import { useTheme } from 'next-themes' import ChainToggle from 'components/common/ChainToggle' import optimizeImage from 'utils/optimizeImage' import { MarkdownLink } from 'components/primitives/MarkdownLink' import { useRouter } from 'next/router' import Header from 'components/home/Header' const StyledImage = styled('img', {}) const Home: NextPage = ({ ssr }) => { const router = useRouter() const marketplaceChain = useMarketplaceChain() const isMounted = useMounted() // not sure if there is a better way to fix this const { theme: nextTheme } = useTheme() const [theme, setTheme] = useState(null) useEffect(() => { if (nextTheme) { setTheme(nextTheme) } }, [nextTheme]) const { chain, switchCurrentChain } = useContext(ChainContext) const handleEthereum = () => { const newChain = supportedChains?.find( (ch) => ch?.routePrefix == 'ethereum' ) if (newChain) { // const newUrl = router.asPath.replace( // chain.routePrefix, // newChain?.routePrefix // ) // console.log(newUrl) switchCurrentChain(newChain?.id) router.push( `/ethereum/collection/0x21ec102c3688e9ea05605545216ebc9a21461d81?sortBy=tokenId&sortDirection=asc&attributes%5BSeries%5D=PepeCoin+Official&attributes%5BSeries%5D=Core`, undefined, { scroll: false } ) } } /* const handleZora = () => { const newChain = supportedChains?.find((ch) => ch?.routePrefix == 'zora') if (newChain) { // const newUrl = router.asPath.replace( // chain.routePrefix, // newChain?.routePrefix // ) // console.log(newUrl) switchCurrentChain(newChain?.id) router.push( `/ethereum/collection/0x21ec102c3688e9ea05605545216ebc9a21461d81`, undefined, { scroll: false } ) } } const handleSapo = () => { const newChain = supportedChains?.find( (ch) => ch?.routePrefix == 'ethereum' ) if (newChain) { // const newUrl = router.asPath.replace( // chain.routePrefix, // newChain?.routePrefix // ) // console.log(newUrl) switchCurrentChain(newChain?.id) router.push( `/ethereum/collection/0x9523e213d3929be2c6f48e5dafe2b8a3d4fd3e39`, undefined, { scroll: false } ) } } */ return ( {/*
*/}
collection image Verified Artists {/* */} Ongoing creations by verified artists via pepecoin Paint. Verified artists are creators that have been verified by the community. FLOOR {/* */} floor value {/* 24H SALES {topCollection?.count?.toLocaleString()} */} {/* RECENT SALES {topCollection?.recentSales ?.slice(0, 4) ?.map((sale, i) => ( { e.stopPropagation() e.preventDefault() if ( sale?.collection?.id && sale?.token?.id ) { router.push( `/${chain.routePrefix}/asset/${sale?.collection?.id}:${sale?.token?.id}` ) } }} > ))} */} {theme == 'light' ? ( ) : ( )} collection image Main Gallery {/* */} Lorem ipsum dolor sit amet consectetur adipisicing elit. Expedita voluptatem vitae, animi placeat, necessitatibus eaque molestiae explicabo aut architecto sequi inventore officia. Voluptatum explicabo, dicta assumenda rerum officia distinctio voluptatibus! FLOOR {/* */} floor value {/* 24H SALES {topCollection?.count?.toLocaleString()} */} {/* RECENT SALES {topCollection?.recentSales ?.slice(0, 4) ?.map((sale, i) => ( { e.stopPropagation() e.preventDefault() if ( sale?.collection?.id && sale?.token?.id ) { router.push( `/${chain.routePrefix}/asset/${sale?.collection?.id}:${sale?.token?.id}` ) } }} > ))} */} {theme == 'light' ? ( ) : ( )}
{/*
Goerli
Ethereum
Zora
View to nothingness (2008-2012)
*/}
{/*