Extract social icons to component and add to mobile nav bar
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FaEnvelope, FaGithub, FaLinkedin } from "react-icons/fa6";
|
||||
import SocialIcons from "./SocialIcons";
|
||||
|
||||
export default function Footer() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
@@ -7,29 +7,7 @@ export default function Footer() {
|
||||
<footer className="mt-auto">
|
||||
<div className="mx-auto py-8">
|
||||
<div className="md:flex md:items-center md:justify-between">
|
||||
<div className="flex space-x-6 md:order-2">
|
||||
<a
|
||||
href="https://github.com/bdfin"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">GitHub</span>
|
||||
<FaGithub size={20} />
|
||||
</a>
|
||||
<a
|
||||
href="https://www.linkedin.com/in/beau-findlay/"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">LinkedIn</span>
|
||||
<FaLinkedin size={20} />
|
||||
</a>
|
||||
<a
|
||||
href="mailto:me@beaufindlay.com"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">Email</span>
|
||||
<FaEnvelope size={20} />
|
||||
</a>
|
||||
</div>
|
||||
<SocialIcons />
|
||||
<p className="mt-8 text-xs leading-5 text-slate-100 md:order-1 md:mt-0">
|
||||
© {currentYear} Beau Findlay. All rights reserved.
|
||||
</p>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useState } from "react";
|
||||
import { FaBars, FaXmark } from "react-icons/fa6";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import logo from "../assets/logo.webp";
|
||||
|
||||
import SocialIcons from "./SocialIcons";
|
||||
|
||||
export default function NavBar() {
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||
@@ -77,6 +77,9 @@ export default function NavBar() {
|
||||
This App
|
||||
</NavLink>
|
||||
</div>
|
||||
<div className="flex justify-center items-center py-8">
|
||||
<SocialIcons size={24} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Dialog.Panel>
|
||||
|
||||
33
src/Client/src/components/SocialIcons.tsx
Normal file
33
src/Client/src/components/SocialIcons.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { FaEnvelope, FaGithub, FaLinkedin } from "react-icons/fa6";
|
||||
|
||||
interface Props {
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export default function SocialIcons({ size = 20 }: Props) {
|
||||
return (
|
||||
<div className="flex space-x-6 md:order-2">
|
||||
<a
|
||||
href="https://github.com/bdfin"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">GitHub</span>
|
||||
<FaGithub size={size} />
|
||||
</a>
|
||||
<a
|
||||
href="https://www.linkedin.com/in/beau-findlay/"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">LinkedIn</span>
|
||||
<FaLinkedin size={size} />
|
||||
</a>
|
||||
<a
|
||||
href="mailto:me@beaufindlay.com"
|
||||
className="text-slate-200 hover:text-slate-500"
|
||||
>
|
||||
<span className="sr-only">Email</span>
|
||||
<FaEnvelope size={size} />
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user