Skip to content

Commit

Permalink
Add callout when nfts are selected with multi chain
Browse files Browse the repository at this point in the history
  • Loading branch information
wraeth-eth committed Feb 8, 2025
1 parent 94ba8a7 commit 01b79a7
Showing 1 changed file with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Checkbox, Form } from 'antd'
import { useCallback, useContext, useEffect, useMemo, useState } from 'react'

import { CheckCircleFilled } from '@ant-design/icons'
import { InformationCircleIcon } from '@heroicons/react/24/outline'
import { Trans } from '@lingui/macro'
import { Callout } from 'components/Callout/Callout'
import ExternalLink from 'components/ExternalLink'
Expand Down Expand Up @@ -68,9 +69,7 @@ export const ReviewDeployPage = () => {
const nftRewards = useAppSelector(
state => state.creatingV2Project.nftRewards.rewardTiers,
)
const {
projectChainId,
} = useAppSelector(state => state.creatingV2Project)
const { projectChainId } = useAppSelector(state => state.creatingV2Project)

const nftRewardsAreSet = useMemo(
() => nftRewards && nftRewards?.length > 0,
Expand All @@ -85,10 +84,10 @@ export const ReviewDeployPage = () => {
dispatch(creatingV2ProjectActions.resetState())
}, [dispatch, goToPage, router])

const walletConnectedToWrongChain = chain?.id && projectChainId !== parseInt(chain.id)
const walletConnectedToWrongChain =
chain?.id && projectChainId !== parseInt(chain.id)

const onFinish = useCallback(async () => {

if (walletConnectedToWrongChain) {
await changeNetworks(projectChainId)
return
Expand Down Expand Up @@ -177,9 +176,20 @@ export const ReviewDeployPage = () => {
key={ReviewDeployKey.Rewards}
collapsible={nftRewardsAreSet ? 'header' : 'disabled'}
header={
<Header skipped={!nftRewardsAreSet}>
<Trans>NFTs</Trans>
</Header>
<div className="flex items-center gap-3.5">
<Header skipped={!nftRewardsAreSet}>
<Trans>NFTs</Trans>
</Header>
{/* TODO: Only show this when there is multiple chains selected */}
<Callout
className="items-center bg-bluebs-25 py-2 px-3 text-bluebs-700"
iconComponent={
<InformationCircleIcon className="h-6 w-6 text-bluebs-700" />
}
>
NFTs will be deployed across all selected chains
</Callout>
</div>
}
>
<RewardsReview />
Expand Down

0 comments on commit 01b79a7

Please sign in to comment.