Skip to content

Commit 55f823b

Browse files
committed
Replace twitter.com with x.com
1 parent 58a16d2 commit 55f823b

5 files changed

Lines changed: 9 additions & 13 deletions

File tree

layouts/Post/components/Footer/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { capitalize } from "lodash";
22
import React from "react";
3-
import { FaGithub, FaTwitter } from "react-icons/fa";
3+
import { FaGithub, FaXTwitter } from "react-icons/fa6";
44

55
import { ApiArticle } from "@/cms/api/ApiArticle";
66

77
type ChipProps = { children: React.ReactNode; href: string; type: "twitter" | "github" };
88

99
const Chip = ({ children, href, type }: ChipProps) => {
1010
const kype = capitalize(type);
11-
const Icon = type === "twitter" ? FaTwitter : FaGithub;
11+
const Icon = type === "twitter" ? FaXTwitter : FaGithub;
1212

1313
const classes = ["Post__Footer__Chip", `Post__Footer__Chip--${kype}`].join(" ");
1414

@@ -29,10 +29,7 @@ export function Footer({ post }: FooterProps) {
2929

3030
return (
3131
<footer className="Post__Footer">
32-
<Chip
33-
type="twitter"
34-
href={`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareableUrl)}&text=${tweet}`}
35-
>
32+
<Chip type="twitter" href={`https://x.com/intent/tweet?url=${encodeURIComponent(shareableUrl)}&text=${tweet}`}>
3633
Share on Twitter
3734
</Chip>
3835

layouts/Post/components/Footer/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
.Post__Footer__Chip--Twitter {
24-
background-color: #1da1f2;
24+
background-color: #24292f;
2525
color: var(--c-white);
2626
}
2727

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference types="next/navigation-types/compat/navigation" />
43

54
// NOTE: This file should not be edited
65
// see https://nextjs.org/docs/basic-features/typescript for more information.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"prismjs": "1.29.0",
1919
"react": "18.2.0",
2020
"react-dom": "18.2.0",
21-
"react-icons": "4.10.1",
21+
"react-icons": "4.11.0",
2222
"remark-unwrap-images": "3.0.1",
2323
"zod": "3.21.4"
2424
},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6666,10 +6666,10 @@ react-dom@18.2.0:
66666666
loose-envify "^1.1.0"
66676667
scheduler "^0.23.0"
66686668

6669-
react-icons@4.10.1:
6670-
version "4.10.1"
6671-
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.10.1.tgz#3f3b5eec1f63c1796f6a26174a1091ca6437a500"
6672-
integrity sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==
6669+
react-icons@4.11.0:
6670+
version "4.11.0"
6671+
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.11.0.tgz#4b0e31c9bfc919608095cc429c4f1846f4d66c65"
6672+
integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==
66736673

66746674
react-is@^16.13.1:
66756675
version "16.13.1"

0 commit comments

Comments
 (0)