Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This denpendency doesn't belong here, since its for nextjs. Pls install it in the nextjs folder.

Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
},
"engines": {
"node": ">=20.18.3"
},
"dependencies": {
"react-icons": "^5.5.0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Link from "next/link";
import { GithubIcon, TelegramIcon, TwitterIcon } from "./Icons";

type SocialLinksProps = {
twitter?: string;
github?: string;
telegram?: string;
};

export const SocialLinks = ({ twitter, github, telegram }: SocialLinksProps) => (
<div className="flex gap-4">
{twitter && (
<Link href={`https://twitter.com/${twitter}`} target="_blank">
<span className="w-6 h-6 hover:text-blue-400">
<TwitterIcon />
</span>
</Link>
)}
{github && (
<Link href={`https://github.com/${github}`} target="_blank">
<span className="w-6 h-6 hover:text-gray-600">
<GithubIcon />
</span>
</Link>
)}
{telegram && (
<Link href={`https://t.me/${telegram}`} target="_blank">
<span className="w-6 h-6 hover:text-blue-500">
<TelegramIcon />
</span>
</Link>
)}
</div>
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// components/Icons.tsx

export const TwitterIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<path d="M22.46 6c-.77.35-1.6.58-2.46.69a4.27 4.27 0 001.88-2.35 8.44 8.44 0 01-2.7 1.03 4.23 4.23 0 00-7.21 3.86 12 12 0 01-8.72-4.42 4.23 4.23 0 001.31 5.65 4.23 4.23 0 01-1.92-.53v.05a4.23 4.23 0 003.39 4.14 4.27 4.27 0 01-1.91.07 4.24 4.24 0 003.95 2.93A8.5 8.5 0 012 19.54 12 12 0 008.29 21c7.55 0 11.69-6.26 11.69-11.69l-.01-.53A8.36 8.36 0 0022.46 6z" />
</svg>
);

export const GithubIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0a12 12 0 00-3.79 23.39c.6.11.82-.26.82-.58v-2c-3.34.73-4.04-1.61-4.04-1.61a3.18 3.18 0 00-1.34-1.76c-1.1-.76.08-.75.08-.75a2.5 2.5 0 011.84 1.24 2.54 2.54 0 003.48 1 2.54 2.54 0 01.76-1.6c-2.67-.3-5.48-1.34-5.48-5.95a4.64 4.64 0 011.24-3.21 4.3 4.3 0 01.12-3.17s1-.32 3.3 1.23a11.45 11.45 0 016 0c2.3-1.55 3.3-1.23 3.3-1.23a4.3 4.3 0 01.12 3.17 4.64 4.64 0 011.24 3.21c0 4.62-2.81 5.65-5.5 5.95a2.85 2.85 0 01.82 2.22v3.29c0 .32.22.7.83.58A12 12 0 0012 0z" />
</svg>
);

export const TelegramIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">
<path d="M9.993 15.447l-.396 4.338c.569 0 .816-.243 1.117-.536l2.675-2.548 5.55 4.053c1.015.56 1.746.265 2-.935l3.627-17.036-.003.001c.325-1.527-.549-2.124-1.547-1.757L.68 9.94c-1.487.576-1.47 1.394-.255 1.76l5.66 1.766L18.34 5.958c.553-.368 1.055-.164.641.204L9.993 15.447z" />
</svg>
);
Loading