Skip to content

Commit f0db522

Browse files
authored
Merge pull request #86 from kimurash/83-linkedin-link
LinkedInのリンクを追加した
2 parents 4d132bb + 69b7532 commit f0db522

1 file changed

Lines changed: 51 additions & 28 deletions

File tree

app/about/_sections/about/components/SocialLinks.tsx

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,60 @@
1-
import { FaGithub, FaXTwitter } from "react-icons/fa6";
1+
import type { ReactNode } from "react";
2+
import { FaGithub, FaLinkedin, FaXTwitter } from "react-icons/fa6";
23
import { SiZenn } from "react-icons/si";
34

5+
interface SocialLinkProps {
6+
href: string;
7+
ariaLabel: string;
8+
icon: ReactNode;
9+
className: string;
10+
}
11+
12+
const socialLinks: SocialLinkProps[] = [
13+
{
14+
href: "https://github.com/kimurash",
15+
ariaLabel: "GitHubプロフィールを開く",
16+
icon: <FaGithub size={29} />,
17+
className: "bg-gray-800 text-white hover:bg-gray-700",
18+
},
19+
{
20+
href: "https://x.com/XeRn1227",
21+
ariaLabel: "X(旧Twitter)プロフィールを開く",
22+
icon: <FaXTwitter size={28} />,
23+
className: "bg-gray-800 text-white hover:bg-gray-700",
24+
},
25+
{
26+
href: "https://www.linkedin.com/in/shunsei-kimura/",
27+
ariaLabel: "LinkedInプロフィールを開く",
28+
icon: <FaLinkedin size={28} />,
29+
className: "bg-[#0B66C3] text-white hover:bg-[#006097]",
30+
},
31+
{
32+
href: "https://zenn.dev/shunsei",
33+
ariaLabel: "Zennプロフィールを開く",
34+
icon: <SiZenn size={28} />,
35+
className: "bg-slate-200 text-[#3EA8FF] hover:bg-slate-300 border border-slate-300",
36+
},
37+
];
38+
439
const SocialLinks = () => {
40+
const baseClassName =
41+
"rounded-full p-2.5 transition flex items-center justify-center";
42+
543
return (
644
<div className="flex justify-center my-6">
745
<div className="flex space-x-4">
8-
<a
9-
href="https://github.com/kimurash"
10-
target="_blank"
11-
rel="noopener noreferrer"
12-
aria-label="GitHubプロフィールを開く"
13-
className="rounded-full bg-gray-800 p-2.5 text-white hover:bg-gray-700 transition flex items-center justify-center"
14-
>
15-
<FaGithub size={29} />
16-
</a>
17-
<a
18-
href="https://x.com/XeRn1227"
19-
target="_blank"
20-
rel="noopener noreferrer"
21-
aria-label="X(旧Twitter)プロフィールを開く"
22-
className="rounded-full bg-gray-800 p-2.5 text-white hover:bg-gray-700 transition flex items-center justify-center"
23-
>
24-
<FaXTwitter size={28} />
25-
</a>
26-
<a
27-
href="https://zenn.dev/shunsei"
28-
target="_blank"
29-
rel="noopener noreferrer"
30-
aria-label="Zennプロフィールを開く"
31-
className="rounded-full bg-slate-200 p-2.5 text-[#3EA8FF] hover:bg-slate-300 border border-slate-300 transition"
32-
>
33-
<SiZenn size={28} />
34-
</a>
46+
{socialLinks.map((link) => (
47+
<a
48+
key={link.href}
49+
href={link.href}
50+
target="_blank"
51+
rel="noopener noreferrer"
52+
aria-label={link.ariaLabel}
53+
className={`${baseClassName} ${link.className}`}
54+
>
55+
{link.icon}
56+
</a>
57+
))}
3558
</div>
3659
</div>
3760
);

0 commit comments

Comments
 (0)