From 6e92821c94a5110eb1f4423ba1a15ef4deb0814f Mon Sep 17 00:00:00 2001 From: Azim Ahmed Date: Thu, 10 Aug 2023 17:28:42 -0400 Subject: [PATCH] chore: brought over arpits changes --- src/components/Share/Share.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/Share/Share.tsx b/src/components/Share/Share.tsx index 80691739..7dc426df 100644 --- a/src/components/Share/Share.tsx +++ b/src/components/Share/Share.tsx @@ -1,10 +1,13 @@ import { FC } from 'react' import Link from 'next/link' +import { Address } from 'wagmi' import { TwitterIcon } from '@/components/icons/Twitter' import { useMintDialogContext } from '@/components/MintDialog/Context/useMintDialogContext' +import { website } from '@/config/website' import { WarpCast } from '@/components/icons/Warpcast' import { Lens } from '@/components/icons/Lens' +import { useEns } from '@/utils/useEns' const twitterURL: string = 'https://twitter.com/intent/tweet' const warpCastURL: string = 'https://warpcast.com' @@ -12,14 +15,14 @@ const lensURL: string = 'https://lenster.xyz' type ShareComponentProps = {} export const Share: FC = () => { - const { dropName } = useMintDialogContext() - const { - location: { href }, - } = window + const { dropName, partnerName, creatorAddress } = useMintDialogContext() + const { name } = useEns(creatorAddress as Address) + + const href = `${website.url}/${partnerName}` const shareText = { - twitter: `I just minted ${dropName}, celebrating the start of @BuildOnBase bringing billions of people onchain.%0a%0aIt’s Onchain Summer.`, - lens: `I just minted ${dropName}, celebrating the start of @BuildOnBase bringing billions of people onchain.%0a%0aIt’s Onchain Summer.`, - warpCast: `I just minted ${dropName}, celebrating the start of @base bringing billions of people onchain.%0a%0aIt’s Onchain Summer.`, + twitter: `I just minted ${dropName} by ${name}, celebrating Onchain Summer with ${partnerName} on @BuildOnBase.`, + lens: `I just minted ${dropName} by ${name}, celebrating Onchain Summer with ${partnerName} on @base.`, + warpCast: `I just minted ${dropName} by ${name}, celebrating Onchain Summer with ${partnerName} on @base.`, } const tweetUrl = `${twitterURL}?url=${href}&text=${shareText['twitter']}`