-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
172 additions
and
52 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { FC } from 'react' | ||
import { CBSubscribeDialog } from '../CBSubscribeDialog' | ||
import { Button } from '../Button' | ||
import { ArrowRight } from '../icons/ArrowRight' | ||
import Image from 'next/image' | ||
|
||
const CHALLENGE_IMAGES = [ | ||
{ url: '/challenge/1.png', alt: 'Based NFT Drop' }, | ||
{ url: '/challenge/2.png', alt: '' }, | ||
{ url: '/challenge/3.png', alt: '' }, | ||
{ url: '/challenge/4.png', alt: '' }, | ||
] | ||
|
||
export const BasedChallenge: FC = ({}) => { | ||
return ( | ||
<section className="bg-ocs-light-gray w-full shadow-large rounded-3xl p-6 flex flex-col gap-6 lg:flex-row"> | ||
<div className="flex flex-col gap-4 max-w-[520px]"> | ||
<h2 className="desktop-h2">Join the Based Challenge</h2> | ||
<p className="desktop-body"> | ||
Claim your free onchain art, then watch it evolve as you mint more on | ||
Base during Onchain Summer. Scan the QR code to get started. | ||
</p> | ||
<CBSubscribeDialog> | ||
<Button> | ||
<span>Claim now</span>{' '} | ||
<span className="hidden md:inline">on Coinbase Wallet</span> | ||
<ArrowRight className="ml-auto" /> | ||
</Button> | ||
</CBSubscribeDialog> | ||
</div> | ||
<div className="grid gap-6 grid-cols-2 sm:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4 w-full items-center max-w-[624px] lg:ml-auto"> | ||
{CHALLENGE_IMAGES.map(({ url, alt }) => ( | ||
<div key={url} className="relative z-20 w-full aspect-square"> | ||
<Image fill src={url} alt={alt} className="object-cover" /> | ||
</div> | ||
))} | ||
</div> | ||
</section> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
'use client' | ||
|
||
import { FC } from 'react' | ||
import { PageContainer } from '../PageContainer' | ||
import { Gift } from '../icons/Gift' | ||
import { DropCardList } from '../DropCard/DropCardList' | ||
import { DropWithPartnerData } from '@/app/page' | ||
import { DropCard } from '../DropCard' | ||
import { siteDataSuffix } from '@/components/MintDialog/types' | ||
import { Trending, TrendingQueryResult } from '../Trending' | ||
import { Tabs, TabsComponentProps } from '../Tabs' | ||
import { BasedChallenge } from '../BasedChallenge/BasedChallenge' | ||
import { useAccount } from 'wagmi' | ||
import { l2 } from '@/config/chain' | ||
import { useQuery } from 'react-query' | ||
import { getTrendingData } from '@/utils/getTrendingData' | ||
|
||
interface PostFestivalPageProps { | ||
activeDrops: DropWithPartnerData[] | ||
tabs: TabsComponentProps | ||
} | ||
|
||
export const PostFestivalPage: FC<PostFestivalPageProps> = ({ | ||
activeDrops, | ||
tabs, | ||
}) => { | ||
const { address: connectedWallet } = useAccount() | ||
const chainId = l2.id | ||
|
||
const { data, error, isLoading } = useQuery<TrendingQueryResult>({ | ||
queryKey: [connectedWallet, chainId], | ||
queryFn: ({ queryKey }) => { | ||
const [connectedWallet, chainId] = queryKey | ||
|
||
return getTrendingData(connectedWallet as string, chainId as number) | ||
}, | ||
}) | ||
|
||
const hasActiveSection = | ||
activeDrops.length > 0 || | ||
(!isLoading && (data?.collections.length ?? 0) > 0) | ||
|
||
return ( | ||
<PageContainer postFestival> | ||
<div className="flex h-full flex-col items-center justify-between relative pb-36 gap-10 md:gap-[54px]"> | ||
{hasActiveSection ? ( | ||
<section className="w-full shadow-large rounded-3xl bg-[#EFEFEF] p-[20px]"> | ||
<div className="mb-4 flex gap-2 items-center"> | ||
<div className="flex justify-center items-center h-[64px] w-[64px] rounded-2xl bg-ocs-turquoise"> | ||
<Gift /> | ||
</div> | ||
<div className=""> | ||
<h2 className="text-[32px] text-display">Active Mints</h2> | ||
</div> | ||
</div> | ||
|
||
<div className="-mr-4 mb-4"> | ||
<DropCardList> | ||
{activeDrops.map((drop) => ( | ||
<DropCard | ||
{...drop} | ||
key={drop.name} | ||
partner={drop.partner} | ||
partnerIcon={drop.partnerIcon} | ||
openSeaLink={drop.openSeaLink} | ||
interactWithNFTLink={drop.interactWithNFTLink} | ||
dataSuffix={siteDataSuffix} | ||
dropDataSuffix={drop.dataSuffix} | ||
buttonText={drop.buttonText} | ||
description={drop.description} | ||
/> | ||
))} | ||
</DropCardList> | ||
</div> | ||
|
||
<Trending /> | ||
</section> | ||
) : null} | ||
|
||
<section className="w-full" id="drops"> | ||
<Tabs {...tabs} /> | ||
</section> | ||
<BasedChallenge /> | ||
</div> | ||
</PageContainer> | ||
) | ||
} |
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