← full-stack-fastapi-template / frontend/src/components/Common/Footer.tsx
| 1 | import { FaGithub, FaLinkedinIn } from "react-icons/fa" |
| 2 | import { FaXTwitter } from "react-icons/fa6" |
| 3 | |
| 4 | const socialLinks = [ |
| 5 | { |
| 6 | icon: FaGithub, |
| 7 | href: "https://github.com/fastapi/fastapi", |
| 8 | label: "GitHub", |
| 9 | }, |
| 10 | { icon: FaXTwitter, href: "https://x.com/fastapi", label: "X" }, |
| 11 | { |
| 12 | icon: FaLinkedinIn, |
| 13 | href: "https://linkedin.com/company/fastapi", |
| 14 | label: "LinkedIn", |
| 15 | }, |
| 16 | ] |
| 17 | |
| 18 | export function Footer() { |
| 19 | const currentYear = new Date().getFullYear() |
| 20 | |
| 21 | return ( |
| 22 | <footer className="border-t py-4 px-6"> |
| 23 | <div className="flex flex-col items-center justify-between gap-4 sm:flex-row"> |
| 24 | <p className="text-muted-foreground text-sm"> |
| 25 | Full Stack FastAPI Template - {currentYear} |
| 26 | </p> |
| 27 | <div className="flex items-center gap-4"> |
| 28 | {socialLinks.map(({ icon: Icon, href, label }) => ( |
| 29 | <a |
| 30 | key={label} |
| 31 | href={href} |
| 32 | target="_blank" |
| 33 | rel="noopener noreferrer" |
| 34 | aria-label={label} |
| 35 | className="text-muted-foreground hover:text-foreground transition-colors" |
| 36 | > |
| 37 | <Icon className="h-5 w-5" /> |
| 38 | </a> |
| 39 | ))} |
| 40 | </div> |
| 41 | </div> |
| 42 | </footer> |
| 43 | ) |
| 44 | } |
| 45 |