|
|
@@ -1,6 +1,7 @@
|
|
|
'use client'
|
|
|
import React, {useEffect, useState} from 'react';
|
|
|
import Image from "next/image";
|
|
|
+import Link from "next/link";
|
|
|
|
|
|
function TopNav() {
|
|
|
const arr = [
|
|
|
@@ -66,9 +67,9 @@ function TopNav() {
|
|
|
const isActive = activeId === item.id
|
|
|
const isHover = hoverId === item.id
|
|
|
return (
|
|
|
- <a
|
|
|
+ <Link
|
|
|
key={idx}
|
|
|
- href="#"
|
|
|
+ href={`#${item.id}`}
|
|
|
onClick={(e) => {
|
|
|
e.preventDefault()
|
|
|
document.getElementById(item.id)?.scrollIntoView({
|
|
|
@@ -91,7 +92,7 @@ function TopNav() {
|
|
|
className="inline-block mr-1"
|
|
|
/>
|
|
|
{item.name}
|
|
|
- </a>
|
|
|
+ </Link>
|
|
|
)
|
|
|
})}
|
|
|
</div>
|