Skip to content

Commit cff8db3

Browse files
authored
chore(main): replace Twitter logo with X logo (#7295)
* chore(main): replace Twitter logo with X logo * update tests,snapshots, use x.com link instead of twitter.com
1 parent ae6c972 commit cff8db3

File tree

7 files changed

+31
-36
lines changed

7 files changed

+31
-36
lines changed

src/components/Footer/Footer.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import ExternalLink from '../ExternalLink';
22
import * as links from '../../constants/links';
33
import { VisuallyHidden, Flex } from '@aws-amplify/ui-react';
4-
import {
5-
IconDiscord,
6-
IconTwitter,
7-
IconGithub,
8-
IconAWS
9-
} from '@/components/Icons';
4+
import { IconDiscord, IconX, IconGithub, IconAWS } from '@/components/Icons';
105
import { ColorModeSwitcher } from '@/components/ColorModeSwitcher';
116

127
interface FooterProps {
@@ -53,19 +48,19 @@ export const Footer = ({ hasTOC = false }: FooterProps) => {
5348
<Flex as="ul" className="footer__links">
5449
<li>
5550
<ExternalLink
56-
href={links.TWITTER}
51+
href={links.X}
5752
className="footer-link footer-link--social"
5853
>
59-
<IconTwitter aria-hidden="true" />
60-
<VisuallyHidden>Twitter</VisuallyHidden>
54+
<IconX />
55+
<VisuallyHidden>X</VisuallyHidden>
6156
</ExternalLink>
6257
</li>
6358
<li>
6459
<ExternalLink
6560
href={links.DISCORD}
6661
className="footer-link footer-link--social"
6762
>
68-
<IconDiscord aria-hidden="true" />
63+
<IconDiscord />
6964
<VisuallyHidden>Discord</VisuallyHidden>
7065
</ExternalLink>
7166
</li>
@@ -74,7 +69,7 @@ export const Footer = ({ hasTOC = false }: FooterProps) => {
7469
href={links.GITHUB}
7570
className="footer-link footer-link--social"
7671
>
77-
<IconGithub aria-hidden="true" />
72+
<IconGithub />
7873
<VisuallyHidden>Github</VisuallyHidden>
7974
</ExternalLink>
8075
</li>

src/components/Footer/__tests__/Footer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('Footer', () => {
2020
const footerLinks = await screen.getAllByRole('link');
2121
const linkUrls = {
2222
Discord: 'https://discord.gg/amplify',
23-
Twitter: 'https://twitter.com/AWSAmplify',
23+
X: 'https://x.com/AWSAmplify',
2424
Github: 'https://github.com/aws-amplify',
2525
'site terms': 'https://aws.amazon.com/terms/',
2626
'privacy policy': 'https://aws.amazon.com/privacy/'

src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/components/Icons/IconTwitter.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/components/Icons/IconX.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Icon } from '@aws-amplify/ui-react';
2+
3+
export const IconX = ({ ...rest }) => {
4+
return (
5+
<Icon
6+
aria-hidden="true"
7+
{...rest}
8+
viewBox={{
9+
minX: 0,
10+
minY: 0,
11+
width: 24,
12+
height: 24
13+
}}
14+
>
15+
<path
16+
d="M13.9761 10.1624L22.7186 0H20.6469L13.0558 8.82384L6.99289 0H0L9.16837 13.3432L0 24H2.07179L10.0881 14.6817L16.4911 24H23.4839L13.9761 10.1624ZM2.81829 1.55962H6.00044L20.6479 22.5113H17.4657L2.81829 1.55962Z"
17+
fill="currentColor"
18+
/>
19+
</Icon>
20+
);
21+
};

src/components/Icons/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export { IconStar } from './IconStar';
2525
export { IconSystem } from './IconSystem';
2626
export { IconTOC } from './IconTOC';
2727
export { IconTS } from './IconTS';
28-
export { IconTwitter } from './IconTwitter';
2928
export { IconVue } from './IconVue';
29+
export { IconX } from './IconX';
3030
export { IconExternalLink } from './IconExternalLink';
3131
export { IconThumbsUp } from './IconThumbsUp';
3232
export { IconThumbsDown } from './IconThumbsDown';

src/constants/links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const DISCORD = 'https://discord.gg/amplify';
22
export const LEARN = 'https://amplify.aws/learn';
33
export const CONTRIBUTE = 'https://docs.amplify.aws/contribute/';
4-
export const TWITTER = 'https://twitter.com/AWSAmplify';
4+
export const X = 'https://x.com/AWSAmplify';
55
export const GITHUB = 'https://github.com/aws-amplify';
66
export const TERMS = 'https://aws.amazon.com/terms/';
77
export const PRIVACY = 'https://aws.amazon.com/privacy/';

0 commit comments

Comments
 (0)