Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Convert twitter links and texts to x #11146

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/aptos/components/SwapWarningModal/MojoWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const MojitoWarning = () => {
return (
<>
<Text>{t('Please note that the Mojito Markets team have paused project development for the time being')}</Text>
<LinkExternal href="https://twitter.com/MojitoMarkets/status/1604940075636527104">
{t('For more info, please see %brand%’s twitter.', { brand: 'Mojito Markets' })}
<LinkExternal href="https://x.com/MojitoMarkets/status/1604940075636527104">
{t('For more info, please see %brand%’s X.', { brand: 'Mojito Markets' })}
</LinkExternal>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/aptos/config/constants/ifo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ifos: Ifo[] = [
articleUrl: 'https://medium.com/pancakeswap/bluemove-move-ifo-to-be-hosted-on-aptos-pancakeswap-25adee83d1ee',
tokenOfferingPrice: 0.04,
version: 3.2,
twitterUrl: 'https://twitter.com/BlueMove_OA',
xUrl: 'https://x.com/BlueMove_OA',
description:
'BlueMove is the leading multi-chain NFT Marketplace on Aptos and Sui, where creators can easily create their own NFTs, and freely list their collections for buying, selling and trading',
vestingTitle: 'Stake $MOVE to access BlueMove Launchpad projects and earn platform fees',
Expand Down
2 changes: 1 addition & 1 deletion apps/aptos/config/constants/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface Ifo {
campaignId: string
tokenOfferingPrice: number
description?: string
twitterUrl?: string
xUrl?: string
telegramUrl?: string
version: number
vestingTitle?: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { styled } from 'styled-components'
import { Flex, Text, LanguageIcon, SvgProps, Svg, TwitterIcon, Link, TelegramIcon, FlexGap } from '@pancakeswap/uikit'
import { Flex, Text, LanguageIcon, SvgProps, Svg, XIcon, Link, TelegramIcon, FlexGap } from '@pancakeswap/uikit'
import { Ifo } from 'config/constants/types'
import { getBlockExploreLinkDefault } from 'utils'
import { IFO_ADDRESS } from 'views/Ifos/constants'
Expand Down Expand Up @@ -71,9 +71,9 @@ const IfoCardFooter: React.FC<React.PropsWithChildren<Props>> = ({ status, ifo }
<Link external href={getBlockExploreLinkDefault(IFO_ADDRESS, 'token', chainId)}>
<SmartContractIcon color="textSubtle" />
</Link>
{ifo.twitterUrl && (
<Link external href={ifo.twitterUrl}>
<TwitterIcon color="textSubtle" />
{ifo.xUrl && (
<Link external href={ifo.xUrl}>
<XIcon color="textSubtle" />
</Link>
)}
{ifo.telegramUrl && (
Expand Down
6 changes: 3 additions & 3 deletions apps/blog/components/Article/SingleArticle/SocialIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { styled } from 'styled-components'
import { Flex, TwitterIcon, TelegramIcon, RedditIcon, Link, DiscordIcon } from '@pancakeswap/uikit'
import { Flex, XIcon, TelegramIcon, RedditIcon, Link, DiscordIcon } from '@pancakeswap/uikit'
import { useRouter } from 'next/router'

const StyledLink = styled(Link)`
Expand Down Expand Up @@ -39,8 +39,8 @@ const SocialIcon = () => {
const router = useRouter()
return (
<StyledSocialIcon>
<StyledLink external href={`https://twitter.com/share?url=${BLOG_URL}${router.asPath}`}>
<TwitterIcon width={40} />
<StyledLink external href={`https://x.com/share?url=${BLOG_URL}${router.asPath}`}>
<XIcon width={40} />
</StyledLink>
<StyledLink external href={`https://telegram.me/share/url?url=${BLOG_URL}${router.asPath}`}>
<TelegramIcon width={40} />
Expand Down
2 changes: 1 addition & 1 deletion apps/gamification/pages/api/task/twitterFollow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const handler = async (req, res) => {
}

const { account, questId, token, tokenSecret, userId, targetUserId, providerId, taskId } = req.query
const url = `https://api.twitter.com/2/users/${userId}/following`
const url = `https://api.x.com/2/users/${userId}/following`
const method = 'POST'
const consumerKey = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKey as string
const consumerSecret = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKeySecret as string
Expand Down
2 changes: 1 addition & 1 deletion apps/gamification/pages/api/task/twitterLiked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const handler = async (req, res) => {
const consumerKey = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKey as string
const consumerSecret = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKeySecret as string

const url = `https://api.twitter.com/2/users/${userId}/likes`
const url = `https://api.x.com/2/users/${userId}/likes`
const method = 'POST'

const response = await fetch(url, {
Expand Down
2 changes: 1 addition & 1 deletion apps/gamification/pages/api/task/twitterRetweet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const handler = async (req, res) => {
})
}

const url = `https://api.twitter.com/2/users/${userId}/retweets`
const url = `https://api.x.com/2/users/${userId}/retweets`
const method = 'POST'
const consumerKey = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKey as string
const consumerSecret = TWITTER_CONSUMER_KEY[providerId as TwitterFollowersId].consumerKeySecret as string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
InstagramIcon,
LanguageIcon,
TelegramIcon,
TwitterIcon,
XIcon,
YoutubeIcon,
} from '@pancakeswap/uikit'
import { useCallback } from 'react'
Expand All @@ -28,7 +28,7 @@ export const useTaskInfo = (primaryColor: boolean = false, iconSize: number = 20
case TaskType.X_LIKE_POST:
case TaskType.X_FOLLOW_ACCOUNT:
case TaskType.X_REPOST_POST:
return <TwitterIcon color={color} width={size} height={size} />
return <XIcon color={color} width={size} height={size} />
case TaskType.TELEGRAM_JOIN_GROUP:
return <TelegramIcon color={color} width={size} height={size} />
case TaskType.DISCORD_JOIN_SERVER:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Modal,
TelegramIcon,
Text,
TwitterIcon,
XIcon,
} from '@pancakeswap/uikit'
import ConnectWalletButton from 'components/ConnectWalletButton'
import useAuth from 'hooks/useAuth'
Expand Down Expand Up @@ -86,7 +86,7 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({ userInfo, refresh,
<SocialComponent
name={t('X')}
disabled={disabled}
icon={<TwitterIcon color="textSubtle" width={20} height={20} />}
icon={<XIcon color="textSubtle" width={20} height={20} />}
connected={Boolean(userInfo?.socialHubToSocialUserIdMap?.Twitter)}
connect={connectTwitter}
disconnect={disconnectTwitter}
Expand Down
6 changes: 3 additions & 3 deletions apps/gamification/views/Quest/components/Share.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
MoreIcon,
TelegramIcon,
Text,
TwitterIcon,
XIcon,
copyText,
useToast,
} from '@pancakeswap/uikit'
Expand Down Expand Up @@ -90,10 +90,10 @@ export const Share: React.FC<ShareProps> = ({ title, contractChainId, contractAd
{t('Copy the link')}
</Text>
</Flex>
<Link href={`https://twitter.com/intent/post?text=${title}&url=${window?.location?.href}`} external>
<Link href={`https://x.com/intent/post?text=${title}&url=${window?.location?.href}`} external>
<Flex>
<Flex alignSelf="flex-start">
<TwitterIcon color="primary" width="20px" height="20px" />
<XIcon color="primary" width="20px" height="20px" />
</Flex>
<Text ml="8px" lineHeight="20px">
{t('Share on X')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Question = () => {
<FoldableText title={t('What is the criteria to become a PancakeSwap affiliate?')} mt="24px">
<StyledListText color="textSubtle">
{t(
'At least 10,000 followers across social media platforms such as Twitter, Youtube, Discord, Instagram and Telegram',
'At least 10,000 followers across social media platforms such as X, Youtube, Discord, Instagram and Telegram',
)}
</StyledListText>
<StyledListText color="textSubtle">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/views/Home/components/CakeDataRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const StyledWrapper = styled(Flex)`
* but the contract was written in such a way that when we performed the migration from Masterchef v1 to v2, the tokens were stuck.
* These stuck tokens are forever gone (see their medium post) and can be considered out of circulation."
* https://planetfinanceio.medium.com/pancakeswap-works-with-planet-to-help-cake-holders-f0d253b435af
* https://twitter.com/PancakeSwap/status/1523913527626702849
* https://x.com/PancakeSwap/status/1523913527626702849
* https://bscscan.com/tx/0xd5ffea4d9925d2f79249a4ce05efd4459ed179152ea5072a2df73cd4b9e88ba7
*/
const planetFinanceBurnedTokensWei = 637407922445268000000000n
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
DiscordIcon,
InstagramIcon,
Link,
RedditIcon,
TelegramIcon,
TwitterIcon,
YoutubeIcon,
} from '@pancakeswap/uikit'
import { DiscordIcon, InstagramIcon, Link, RedditIcon, TelegramIcon, XIcon, YoutubeIcon } from '@pancakeswap/uikit'
import { cloneElement } from 'react'
import { styled } from 'styled-components'

Expand Down Expand Up @@ -41,7 +33,7 @@ const CommunityTag = styled.div`
}
`
const communityData = [
{ icon: <TwitterIcon />, href: 'https://twitter.com/pancakeswap', alt: 'TwitterIcon' },
{ icon: <XIcon />, href: 'https://x.com/pancakeswap', alt: 'XIcon' },
{ icon: <TelegramIcon />, href: 'https://t.me/pancakeswap', alt: 'TelegramIcon' },
{ icon: <DiscordIcon />, href: 'https://discord.gg/pancakeswap', alt: 'DiscordIcon' },
{ icon: <InstagramIcon />, href: 'https://www.instagram.com/pancakeswap_official/', alt: 'InstagramIcon' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const LeftBottomBox: React.FC = () => {
return (
<LeftImageWrapper>
<Image className="discord" src={`${ASSET_CDN}/web/landing/socials/1.png`} alt="discord" />
<Image className="twitter" src={`${ASSET_CDN}/web/landing/socials/2.png`} alt="twitter" />
<Image className="x" src={`${ASSET_CDN}/web/landing/socials/2.png`} alt="x" />
<Image className="telegram" src={`${ASSET_CDN}/web/landing/socials/3.png`} alt="telegram" />
<Image className="instagram" src={`${ASSET_CDN}/web/landing/socials/4.png`} alt="instagram" />
</LeftImageWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ const TweetBox = styled.div`
line-height: 120%;
`

export const useTweetsData = () => {
export const useXPostsData = () => {
return useMemo(() => {
return [
{
tweet: `Get Your Uniswap Interface Fees Refunded on PancakeSwap, up to $8M!
post: `Get Your Uniswap Interface Fees Refunded on PancakeSwap, up to $8M!

Match your Ethereum Uniswap volume 1:1 on Ethereum PancakeSwap, and we’ll refund ALL your interface fees paid.
Trade now: https://pancakeswap.finance/swap?chain=eth&utm_source=twitter&utm_medium=Ethereum&utm_campaign=Swap&utm_id=InterfacefeeRefund
Trade now: https://pancakeswap.finance/swap?chain=eth&utm_source=x&utm_medium=Ethereum&utm_campaign=Swap&utm_id=InterfacefeeRefund
`,
link: 'https://x.com/PancakeSwap/status/1791076335462314097',
date: 'May 16',
Expand Down Expand Up @@ -105,15 +105,15 @@ const StyledText = styled(Text)`
}
`

export const TwitterCards: React.FC = () => {
export const XCards: React.FC = () => {
const { t } = useTranslation()
const tweets = useTweetsData()
const posts = useXPostsData()
const { theme } = useTheme()
const { isMobile } = useMatchBreakpoints()
return (
<Wrapper>
<Text bold mb="24px">
{t('Top Tweet of the week')}
{t('Top Post of the Week on X')}
</Text>
<LogoBox>
<LogoIcon width={30} />
Expand All @@ -130,23 +130,23 @@ export const TwitterCards: React.FC = () => {
</StyledText>
<Divider />
<Text fontSize={14} color={theme.colors.textSubtle}>
{tweets[0].date}
{posts[0].date}
</Text>
<Divider />
<FavoriteBorderIcon width={isMobile ? 14 : 16} color={theme.colors.textSubtle} mr="2px" />
<Text fontSize={14} color={theme.colors.textSubtle}>
{tweets[0].like}
{posts[0].like}
</Text>
<Divider />
<BarChartIcon color={theme.colors.textSubtle} />
<Text fontSize={14} color={theme.colors.textSubtle}>
{tweets[0].impression}
{posts[0].impression}
</Text>
</Flex>
<TweetWrapper>
<TweetBox>{tweets[0].tweet}</TweetBox>
<TweetBox>{posts[0].post}</TweetBox>
</TweetWrapper>
<Link external href={tweets[0].link} marginTop="5px">
<Link external href={posts[0].link} marginTop="5px">
{t('Web link')} <OpenNewIcon ml="3px" color="primary" />
</Link>
</Wrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Swiper, SwiperSlide } from 'swiper/react'
import CommunitySummary, { sharedCss } from './CommunitySummary'
import { CommunityTags } from './CommunityTags'
import { LeftBottomBox, RightBottomBox } from './ImagesOnBg'
import { BlogCard, TwitterCards } from './TwitterCards'
import { BlogCard, XCards } from './XCards'

const TransparentFrame = styled.div<{ isDark: boolean }>`
position: relative;
Expand Down Expand Up @@ -107,8 +107,8 @@ const CommunitySection = () => {
loop
pagination={{ clickable: true }}
>
<SwiperSlide key="TwitterCards">
<TwitterCards />
<SwiperSlide key="XCards">
<XCards />
</SwiperSlide>
<SwiperSlide key="BlogCard">
<BlogCard />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
SvgProps,
TelegramIcon,
Text,
TwitterIcon,
XIcon,
} from '@pancakeswap/uikit'
import { BIG_TEN } from '@pancakeswap/utils/bigNumber'
import { formatBigInt } from '@pancakeswap/utils/formatBalance'
Expand Down Expand Up @@ -158,9 +158,9 @@ const IfoAchievement: React.FC<React.PropsWithChildren<Props>> = ({ ifo, publicI
<Link external href={getBlockExploreLink(ifo.address, 'address', ifo.chainId)}>
<SmartContractIcon color="textSubtle" />
</Link>
{ifo.twitterUrl && (
<Link external href={ifo.twitterUrl}>
<TwitterIcon color="textSubtle" />
{ifo.xUrl && (
<Link external href={ifo.xUrl}>
<XIcon color="textSubtle" />
</Link>
)}
{ifo.telegramUrl && (
Expand All @@ -187,9 +187,9 @@ const IfoAchievement: React.FC<React.PropsWithChildren<Props>> = ({ ifo, publicI
<Link external href={getBlockExploreLink(ifo.address, 'address', ifo.chainId)}>
<SmartContractIcon color="textSubtle" />
</Link>
{ifo.twitterUrl && (
<Link external href={ifo.twitterUrl}>
<TwitterIcon color="textSubtle" />
{ifo.xUrl && (
<Link external href={ifo.xUrl}>
<XIcon color="textSubtle" />
</Link>
)}
{ifo.telegramUrl && (
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/views/Nft/market/NftSubgraphWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const NftSubgraphWarning: React.FC = () => {
{t(
'Due to an ongoing Subgraph indexing issue from the underlying infrastructure provider. The PancakeSwap NFT marketplace is currently showing outdated data. Continuing trading may be subject to the risk of executing orders at unexpected prices and loss of funds. We recommend not to trade until the issue is resolved. Follow our ',
)}
<StyledAnchor target="_blank" rel="noreferrer noopener" href="https://twitter.com/pancakeswap/">
Twitter
<StyledAnchor target="_blank" rel="noreferrer noopener" href="https://x.com/pancakeswap/">
X
</StyledAnchor>{' '}
{t('for the latest update.')}
</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { InstagramIcon, TwitterIcon } from '@pancakeswap/uikit'
import { InstagramIcon, XIcon } from '@pancakeswap/uikit'
import { ContextApi } from '@pancakeswap/localization'

type ArtistConfigType = {
Expand All @@ -22,10 +22,10 @@ const artistConfigBuilder = ({ t, isDark }: ArtistConfigType) => ({
],
buttons: [
{
to: 'https://twitter.com/cecymeade',
text: t('Follow on Twitter'),
to: 'https://x.com/cecymeade',
text: t('Follow on X'),
external: true,
icon: <TwitterIcon color="white" />,
icon: <XIcon color="white" />,
},
{
to: 'https://www.instagram.com/cecymeade/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const MPendleWarning = () => {
</Link>
. {t('For more information, please refer to Penpie’s')}{' '}
<Link style={{ display: 'inline' }} external href="https://x.com/penpiexyz_io">
{t('Twitter')}
X
</Link>
.
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ABNBWarning = () => {
'Warning: aBNB token from Ankr has been exploited. Please proceed with caution. We do not recommend users to trade the token.',
)}
</Text>
<LinkExternal href="https://twitter.com/ankr/status/1598503332477280256">{t('Learn More')}</LinkExternal>
<LinkExternal href="https://x.com/ankr/status/1598503332477280256">{t('Learn More')}</LinkExternal>
</Box>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const GalaWarning = () => {
return (
<Box maxWidth="380px">
<Text>{t('Warning: The pGALA token pool is not a valid token trading pair - please stop buying.')}</Text>
<LinkExternal href="https://twitter.com/pNetworkDeFi/status/1588266897061031936">
{t('For more info, please see pGALA’s twitter.')}
<LinkExternal href="https://x.com/pNetworkDeFi/status/1588266897061031936">
{t('For more info, please see pGALA’s X.')}
</LinkExternal>
</Box>
)
Expand Down
Loading
Loading