Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit d7785ca

Browse files
committed
feat: github icon link in header
1 parent 024018a commit d7785ca

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/components/Header.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
1616
import { signIn, signOut } from "next-auth/react";
1717
import Image from "next/image";
1818
import Link from "next/link";
19+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
1920

2021
import { classNames } from "@/utils/classNames";
22+
import socialIcon from "@/config/socialIcon";
2123

2224
const navigation = [
2325
{ name: "Home", href: "/", current: true },
@@ -65,6 +67,19 @@ export default function Header({ session, user }) {
6567

6668
{/* Right section on desktop */}
6769
<div className="hidden lg:ml-4 lg:flex lg:items-center lg:pr-0.5">
70+
<Link
71+
className="relative flex-shrink-0 rounded-full p-1 text-indigo-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600"
72+
href="https://github.com/EddieHubCommunity/CreatorsRegistry"
73+
>
74+
<span className="absolute -inset-1.5" />
75+
<span className="sr-only">GitHub Repo</span>
76+
<FontAwesomeIcon
77+
icon={socialIcon("github")}
78+
className="h-6 w-6"
79+
style={{ height: 25, width: 25 }}
80+
/>
81+
</Link>
82+
6883
{!session && (
6984
<button
7085
type="button"

src/config/socialIcon.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
faDev,
3+
faGithub,
34
faHashnode,
45
faTwitch,
56
faTwitter,
@@ -25,6 +26,9 @@ export default function socialIcon(name) {
2526
case "devto":
2627
icon = faDev;
2728
break;
29+
case "github":
30+
icon = faGithub;
31+
break;
2832
}
2933
return icon;
3034
}

0 commit comments

Comments
 (0)