Skip to content

Commit df1f39a

Browse files
authored
chore: use x icon instead of twitter (#466)
* chore: use x icon instead of twitter * chore: update
1 parent a3e7ee4 commit df1f39a

File tree

10 files changed

+46
-51
lines changed

10 files changed

+46
-51
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"react": "^18.3.1",
4747
"react-dom": "^18.3.1",
4848
"react-hook-form": "^7.53.1",
49+
"react-icons": "^5.3.0",
4950
"react-paginate": "^8.2.0",
5051
"react-syntax-highlighter": "^15.6.1",
5152
"react-use": "^17.5.1",

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/pages/about/meet-crew/founder/founder.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import Link from '@/components/shared/link';
2-
import Image from 'next/image';
3-
41
import clsx from 'clsx';
2+
import Image from 'next/image';
3+
import { BsGithub, BsLinkedin } from 'react-icons/bs';
54

6-
import LinkedInIcon from '@/svgs/linkedin.inline.svg';
7-
import GitHubIcon from '@/svgs/github.inline.svg';
5+
import Link from '@/components/shared/link';
86

97
const founder = {
108
danny: {
@@ -105,17 +103,15 @@ const Founder = ({ id, className }: { id: keyof typeof founder; className?: stri
105103
<div className="flex items-center">
106104
{position}
107105
<Link href={linkedin}>
108-
<LinkedInIcon
109-
width={20}
110-
height={20}
111-
className="ml-1 shrink-0 items-center transition-opacity duration-200 hover:opacity-80"
106+
<BsLinkedin
107+
size={16}
108+
className="ml-2 shrink-0 items-center transition-opacity duration-200 hover:opacity-80"
112109
/>
113110
</Link>
114111
<Link href={github}>
115-
<GitHubIcon
116-
width={16}
117-
height={16}
118-
className="ml-1 shrink-0 items-center transition-opacity duration-200 hover:opacity-80"
112+
<BsGithub
113+
size={16}
114+
className="ml-2 shrink-0 items-center transition-opacity duration-200 hover:opacity-80"
119115
/>
120116
</Link>
121117
</div>

src/components/pages/blog/aside/social-links/social-links.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
import clsx from 'clsx';
44
import { useEffect, useState } from 'react';
5+
import { BsTwitterX, BsLinkedin } from 'react-icons/bs';
6+
57
import Link from '@/components/shared/link';
6-
import TwitterIcon from '@/svgs/twitter.inline.svg';
7-
import LinkedinIcon from '@/svgs/linkedin.inline.svg';
88
import HackerNewsIcon from '@/svgs/hackernews.inline.svg';
99

1010
const icons = {
1111
twitter: {
12-
Icon: TwitterIcon,
13-
className: 'text-secondary-3',
12+
Icon: BsTwitterX,
13+
className: 'text-gray-40',
1414
iconClassName: 'h-6 w-6',
1515
getShareUrl: (text: string, url: string) => {
16-
return `https://twitter.com/share?text=${text}&url=${url}`;
16+
return `https://x.com/share?text=${text}&url=${url}`;
1717
},
1818
},
1919
linkedIn: {
20-
Icon: LinkedinIcon,
20+
Icon: BsLinkedin,
2121
className: 'text-secondary-3',
2222
iconClassName: 'h-6 w-6',
2323
getShareUrl: (text: string, url: string) => {
@@ -28,7 +28,7 @@ const icons = {
2828
Icon: HackerNewsIcon,
2929
className: 'text-secondary-3',
3030
// Hacknew news's icon is a bit bigger than others. So we need to make it smaller.
31-
iconClassName: 'h-5 w-5',
31+
iconClassName: 'h-6 w-6',
3232
getShareUrl: (text: string, url: string) => {
3333
return `https://news.ycombinator.com/submitlink?u=${url}&t=${text}`;
3434
},

src/components/pages/changelog/hero/hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const Hero = () => {
1414
<br />
1515
Want to be notified? Follow us on{' '}
1616
<Link
17-
href={Route.TWITTER}
17+
href={Route.X}
1818
target="_blank"
1919
className="font-semibold text-primary-1 hover:text-gray-60"
2020
>

src/components/shared/community/cards/cards.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
import { BsGithub, BsDiscord, BsTwitter } from 'react-icons/bs';
2+
13
import NextLink from 'next/link';
24

35
import clsx from 'clsx';
46

57
import Route from '@/lib/route';
68

7-
import DiscordIcon from '@/svgs/discord.inline.svg';
8-
import GithubIcon from '@/svgs/github.inline.svg';
9-
import TwitterIcon from '@/svgs/twitter.inline.svg';
10-
119
const socials = [
1210
{
1311
name: 'Discord',
@@ -19,7 +17,7 @@ const socials = [
1917
name: 'Twitter',
2018
description:
2119
'Latest news and updates. Tag us if you need any help or want to share a feedback.',
22-
href: Route.TWITTER,
20+
href: Route.X,
2321
action: 'Follow Us',
2422
},
2523
{
@@ -32,9 +30,9 @@ const socials = [
3230
];
3331

3432
const icon = {
35-
Discord: DiscordIcon,
36-
Twitter: TwitterIcon,
37-
GitHub: GithubIcon,
33+
Discord: BsDiscord,
34+
Twitter: BsTwitter,
35+
GitHub: BsGithub,
3836
};
3937

4038
const Icon = ({ name }: { name: keyof typeof icon }) => {

src/components/shared/footer/footer.tsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
1+
import { BsGithub, BsDiscord, BsTwitterX, BsYoutube, BsLinkedin } from 'react-icons/bs';
2+
13
import Link from '@/components/shared/link';
24

35
import { MENU } from '@/lib/menus';
46
import Route from '@/lib/route';
57

6-
import DiscordIcon from '@/svgs/discord.inline.svg';
7-
import GithubIcon from '@/svgs/github.inline.svg';
8-
import TwitterIcon from '@/svgs/twitter.inline.svg';
9-
import LinkedInIcon from '@/svgs/linkedin.inline.svg';
10-
import YoutubeIcon from '@/svgs/youtube.inline.svg';
11-
import LocaleSwitcher from '@/components/locale-switcher';
12-
138
const socialLinks = [
149
{
1510
name: 'Github',
1611
href: Route.GITHUB,
17-
icon: GithubIcon,
12+
icon: BsGithub,
1813
},
1914
{
2015
name: 'Discord',
2116
href: Route.DISCORD,
22-
icon: DiscordIcon,
17+
icon: BsDiscord,
2318
},
2419
{
2520
name: 'Twitter',
26-
href: Route.TWITTER,
27-
icon: TwitterIcon,
21+
href: Route.X,
22+
icon: BsTwitterX,
2823
},
2924
{
3025
name: 'Youtube',
3126
href: Route.YOUTUBE,
32-
icon: YoutubeIcon,
27+
icon: BsYoutube,
3328
},
3429
{
3530
name: 'LinkedIn',
3631
href: Route.LINKEDIN,
37-
icon: LinkedInIcon,
32+
icon: BsLinkedin,
3833
},
3934
];
4035

@@ -94,8 +89,7 @@ const Footer = () => {
9489
>
9590
<span className="sr-only">{name}</span>
9691
<Icon
97-
width={24}
98-
height={24}
92+
size={24}
9993
className="shrink-0 transition-opacity duration-200 hover:opacity-80"
10094
/>
10195
</Link>

src/lib/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const Route = {
146146
LIVE_DEMO: 'https://demo.bytebase.com',
147147
HUB: 'https://hub.bytebase.com/workspace',
148148
DISCORD: 'https://discord.com/invite/huyw7gRsyA',
149-
TWITTER: 'https://twitter.com/Bytebase',
149+
X: 'https://x.com/Bytebase',
150150
YOUTUBE: 'https://www.youtube.com/channel/UCIlxsMmakGxeaAwpu1Z6jJg',
151151
GITHUB: 'https://github.com/bytebase/bytebase',
152152
LINKEDIN: 'https://www.linkedin.com/company/bytebase',

src/svgs/linkedin.inline.svg

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

src/svgs/twitter.inline.svg

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

0 commit comments

Comments
 (0)