fix(Navbar): ensure unique keys for all navigation links
This commit is contained in:
1 parent
419ffe3fc4
commit
caf132e69a
1 file changed
+3
-3
@@ -23,11 +23,11 @@ export default function Navbar() {
|
|||||||
{ label: "Studio 3D", href: "/#simulador-3d", highlight: true, is3D: true },
|
{ label: "Studio 3D", href: "/#simulador-3d", highlight: true, is3D: true },
|
||||||
{ label: "Telas de Alambrado", href: "/#produtos" },
|
{ label: "Telas de Alambrado", href: "/#produtos" },
|
||||||
{ label: "Calculadora de Rolos", href: "/#calculadora" },
|
{ label: "Calculadora de Rolos", href: "/#calculadora" },
|
||||||
{ label: "Mourões & Acessórios", href: "/#produtos" },
|
|
||||||
{ label: "Aplicações", href: "/#segmentos" },
|
{ label: "Aplicações", href: "/#segmentos" },
|
||||||
{ label: "Vantagens da Fábrica", href: "/#diferenciais" },
|
{ label: "Vantagens da Fábrica", href: "/#diferenciais" },
|
||||||
{ label: "Obras", href: "/#obras" },
|
{ label: "Obras", href: "/#obras" },
|
||||||
{ label: "FAQ", href: "/#faq" },
|
{ label: "FAQ", href: "/#faq" },
|
||||||
|
{ label: "Contato", href: "/contato" },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -85,7 +85,7 @@ export default function Navbar() {
|
|||||||
<div className="hidden lg:flex items-center gap-6 xl:gap-8">
|
<div className="hidden lg:flex items-center gap-6 xl:gap-8">
|
||||||
{navLinks.map((link) => (
|
{navLinks.map((link) => (
|
||||||
<Link
|
<Link
|
||||||
key={link.href}
|
key={`${link.label}-${link.href}`}
|
||||||
href={link.href}
|
href={link.href}
|
||||||
className={`text-sm font-medium transition-colors duration-200 ${
|
className={`text-sm font-medium transition-colors duration-200 ${
|
||||||
link.highlight
|
link.highlight
|
||||||
@@ -146,7 +146,7 @@ export default function Navbar() {
|
|||||||
<div className="flex flex-col space-y-2 pt-2">
|
<div className="flex flex-col space-y-2 pt-2">
|
||||||
{navLinks.map((link) => (
|
{navLinks.map((link) => (
|
||||||
<Link
|
<Link
|
||||||
key={link.href}
|
key={`mobile-${link.label}-${link.href}`}
|
||||||
href={link.href}
|
href={link.href}
|
||||||
onClick={() => setMobileMenuOpen(false)}
|
onClick={() => setMobileMenuOpen(false)}
|
||||||
className={`px-3 py-2 rounded-md text-sm font-medium ${
|
className={`px-3 py-2 rounded-md text-sm font-medium ${
|
||||||
|
|||||||
Reference in new issue
Block a user