Skip to content

Commit ab35264

Browse files
committedJan 22, 2024
feat: x (twitter) & icon imports
1 parent 641c6f2 commit ab35264

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed
 

‎components/command-dialog.tsx

+22-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import * as React from "react";
44
import { useRouter } from "next/navigation";
55
import { DialogProps } from "@radix-ui/react-alert-dialog";
6-
import { File, Github, Laptop, Mail, Moon, Sun, Twitter } from "lucide-react";
6+
import { File, Laptop, Mail, Moon, Sun } from "lucide-react";
77
import { useTheme } from "next-themes";
8+
import { siGithub, siX } from "simple-icons";
89

910
import siteMetadata, { defaultAuthor } from "@/lib/metadata";
1011
import { navigationLinks } from "@/lib/navigation-links";
@@ -101,12 +102,20 @@ export function CommandDialogComponent({ ...props }: DialogProps) {
101102
<CommandItem
102103
onSelect={() => {
103104
runCommand(() =>
104-
navigate(defaultAuthor.socialProfiles.find((platform) => platform.name === "twitter")?.link as string)
105+
navigate(defaultAuthor.socialProfiles.find((platform) => platform.name === "x")?.link as string)
105106
);
106107
}}
107108
>
108-
<Twitter className="mr-2 h-4 w-4" />
109-
<span>Twitter</span>
109+
<svg
110+
role="img"
111+
viewBox="0 0 24 24"
112+
className="mr-2 h-4 w-4"
113+
fill="currentColor"
114+
xmlns="http://www.w3.org/2000/svg"
115+
>
116+
<path d={siX.path}></path>
117+
</svg>
118+
<span>X (formerly Twitter)</span>
110119
</CommandItem>
111120
<CommandItem
112121
onSelect={() => {
@@ -115,7 +124,15 @@ export function CommandDialogComponent({ ...props }: DialogProps) {
115124
);
116125
}}
117126
>
118-
<Github className="mr-2 h-4 w-4" />
127+
<svg
128+
role="img"
129+
viewBox="0 0 24 24"
130+
className="mr-2 h-4 w-4"
131+
fill="currentColor"
132+
xmlns="http://www.w3.org/2000/svg"
133+
>
134+
<path d={siGithub.path}></path>
135+
</svg>
119136
<span>Github</span>
120137
</CommandItem>
121138
</CommandGroup>

‎components/social-share.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const SocialShare = ({ url, text }: SocialShareProps) => {
4242
>
4343
<path d={siTwitter.path}></path>
4444
</svg>
45-
Twitter
45+
X (formerly Twitter)
4646
</Link>
4747
</DropdownMenuItem>
4848
<DropdownMenuItem asChild>

0 commit comments

Comments
 (0)