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

fix: update Twitter URL to x.com format #7832

Open
wants to merge 1 commit into
base: main
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An open source repository for all Uniswap front end interfaces maintained by Uni

## Socials / Contact

- Twitter: [@Uniswap](https://twitter.com/Uniswap)
- Twitter: [@Uniswap](https://x.com/Uniswap)
- Reddit: [/r/Uniswap](https://www.reddit.com/r/Uniswap/)
- Email: [[email protected]](mailto:[email protected])
- Discord: [Uniswap](https://discord.gg/FCfyBSbCU5)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/externalProfile/ProfileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const ProfileHeader = memo(function ProfileHeader({ address }: ProfileHea

const onPressTwitter = useCallback(async () => {
if (twitter) {
await openUri(`https://twitter.com/${twitter}`)
await openUri(`https://x.com/${twitter}`)
}
}, [twitter])

Expand Down
2 changes: 1 addition & 1 deletion apps/web/functions/explore/tokens/token.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test.each(tokens)('should inject metadata for valid tokens', async (token) => {
)
expect(body).toContain(`<meta property="twitter:image" content="${token.image}" data-rh="true">`)
expect(body).toContain(
`<meta property="twitter:image:alt" content="Get ${token.tokenData.symbol} on Uniswap" data-rh="true">`,
`<meta property=":image:alt" content="Get ${token.tokenData.symbol} on Uniswap" data-rh="true">`,
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function openShareTweetWindow(name: string) {
const positionX = (window.screen.width - TWITTER_WIDTH) / 2
const positionY = (window.screen.height - TWITTER_HEIGHT) / 2
window.open(
`https://twitter.com/intent/tweet?text=Check%20out%20${name}%20${currentLocation}%20via%20@Uniswap`,
`https://x.com/intent/tweet?text=Check%20out%20${name}%20${currentLocation}%20via%20@Uniswap`,
'newwindow',
`left=${positionX}, top=${positionY}, width=${TWITTER_WIDTH}, height=${TWITTER_HEIGHT}`,
)
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/nft/components/collection/CollectionStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const MobileSocialsPopover = ({
</MobileSocialsIcon>
) : null}
{collectionStats.twitterUrl ? (
<MobileSocialsIcon href={'https://twitter.com/' + collectionStats.twitterUrl}>
<MobileSocialsIcon href={'https://x.com/' + collectionStats.twitterUrl}>
<Box margin="auto" paddingTop="6">
<TwitterIcon
fill={themeVars.colors.neutral2}
Expand Down Expand Up @@ -198,7 +198,7 @@ const CollectionName = ({
</SocialsIcon>
) : null}
{collectionStats.twitterUrl ? (
<SocialsIcon href={'https://twitter.com/' + collectionStats.twitterUrl}>
<SocialsIcon href={'https://x.com/' + collectionStats.twitterUrl}>
<TwitterIcon
fill={themeVars.colors.neutral2}
color={themeVars.colors.neutral2}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/nft/components/details/AssetDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export const AssetDetails = ({ asset, collection }: AssetDetailsProps) => {
</DescriptionText>
<SocialsContainer>
{collection.externalUrl && <Resource name="Website" link={`${collection.externalUrl}`} />}
{collection.twitterUrl && <Resource name="Twitter" link={`https://twitter.com/${collection.twitterUrl}`} />}
{collection.twitterUrl && <Resource name="Twitter" link={`https://x.com/${collection.twitterUrl}`} />}
{collection.discordUrl && <Resource name="Discord" link={collection.discordUrl} />}
</SocialsContainer>
</>
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/nft/utils/asset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const getMarketplaceIcon = (marketplace: string, size: string | number =
}

export const generateTweetForAsset = (asset: GenieAsset): string => {
return `https://twitter.com/intent/tweet?text=Check%20out%20${
return `https://x.com/intent/tweet?text=Check%20out%20${
asset.name ? encodeURIComponent(asset.name) : `${asset.collectionName}%20%23${asset.tokenId}`
}%20(${asset.collectionName})%20https://app.uniswap.org/nfts/asset/${asset.address}/${asset.tokenId}%20via%20@uniswap`
}
Expand All @@ -87,7 +87,7 @@ export const generateTweetForPurchase = (assets: UpdatedGenieAsset[], txHashUrl:
const tweetText = `I just purchased ${
multipleCollections ? `${assets.length} NFTs` : `${assets.length} ${assets[0].collectionName ?? 'NFT'}`
} with @Uniswap 🦄\n\nhttps://app.uniswap.org/nfts/${collectionUrl}\n${txHashUrl}`
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}`
return `https://x.com/intent/tweet?text=${encodeURIComponent(tweetText)}`
}

function getMinListingPrice(listings: Listing[]): number {
Expand Down Expand Up @@ -122,5 +122,5 @@ export const generateTweetForList = (assets: WalletAsset[]): string => {
} items on @Uniswap at https://app.uniswap.org/nfts/profile\n\nCollections: ${mapAssetsToCollections(assets)
.map(({ collection, items }) => `${collection} ${items.map((item) => item).join(', ')}`)
.join(', ')} \n\nMarketplaces: ${assets[0].marketplaces?.map((market) => market.name).join(', ')}`
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}`
return `https://x.com/intent/tweet?text=${encodeURIComponent(tweetText)}`
}
2 changes: 1 addition & 1 deletion apps/web/src/pages/Landing/sections/NewsletterEtc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function NewsletterEtc() {
</SquareCard>
<RectCard
group="card"
href="https://twitter.com/Uniswap/"
href="https://x.com/Uniswap/"
target="_blank"
rel="noopener noreferrer"
backgroundColor="$accent2"
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/src/utils/linking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ export function getTokenUrl(currencyId: string, addMobileUTMTags: boolean = fals
}

export function getTwitterLink(twitterName: string): string {
return `https://twitter.com/${twitterName}`
return `https://x.com/${twitterName}`
}