diff --git a/components/NavigationLinks.tsx b/components/NavigationLinks.tsx index 80a79f2..ba48d41 100644 --- a/components/NavigationLinks.tsx +++ b/components/NavigationLinks.tsx @@ -1,10 +1,16 @@ -'use client' +"use client"; import React, { useState } from "react"; import Link from "next/link"; import { motion } from "framer-motion"; -import useMediaQuery from '@mui/material/useMediaQuery'; +import useMediaQuery from "@mui/material/useMediaQuery"; export default function NavigationLinks() { + const [activeSection, setActiveSection] = useState(""); + + const handleSectionClick = (section) => { + setActiveSection(section); + }; + const isMobile = useMediaQuery("(max-width: 600px)"); const linkVariant = { @@ -12,30 +18,73 @@ export default function NavigationLinks() { scale: isMobile ? 1.1 : 1.02, transition: { duration: 0.3, - yoyo: Infinity - } - } - } + yoyo: Infinity, + }, + }, + }; const handleToolsClick = () => { document.title = "AI Fusion - Tools"; - } + }; const handlePromptsClick = () => { document.title = "AI Fusion - Prompts"; - } + }; const handleDatasetsClick = () => { document.title = "AI Fusion - Datasets"; - } + }; return ( - +
- Tools - Prompts - Datasets + { + handleSectionClick("tools"); + handleToolsClick(); + }} + > + Tools + + { + handleSectionClick("prompts"); + handlePromptsClick(); + }} + > + Prompts + + { + handleSectionClick("datasets"); + handleDatasetsClick(); + }} + > + Datasets +
- ) + ); }