Skip to content

Commit

Permalink
Add path to footer #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonatanjacome07 committed Nov 29, 2024
1 parent 89490ff commit 60f4da6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/components/ui/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Link from "next/link";
import Image from "next/image";
import { FooterLink } from "@/types/ui/Footer";
import { usePathname } from "next/navigation";

const footerLinks: FooterLink[] = [
{ label: "Sobre nosotros", href: "/sobre-nosotros" },
Expand All @@ -11,6 +12,8 @@ const footerLinks: FooterLink[] = [
];

const Footer = () => {
const pathname = usePathname();

return (
<footer className="bg-black text-white p-6">
<div className="max-w-7xl mx-auto grid gap-4 grid-cols-1 md:grid-cols-3 md:gap-8 items-center">
Expand Down Expand Up @@ -42,7 +45,11 @@ const Footer = () => {
<Link
key={label}
href={href}
className="text-lg text-white hover:text-primary transition-colors"
className={`text-lg transition-colors ${
pathname === href
? "text-primary"
: "text-white hover:text-primary"
}`}
>
{label}
</Link>
Expand Down

0 comments on commit 60f4da6

Please sign in to comment.