diff --git a/components/NavigationLinks.tsx b/components/NavigationLinks.tsx index b4d1067..ba48d41 100644 --- a/components/NavigationLinks.tsx +++ b/components/NavigationLinks.tsx @@ -7,7 +7,7 @@ import useMediaQuery from "@mui/material/useMediaQuery"; export default function NavigationLinks() { const [activeSection, setActiveSection] = useState(""); - const handleSectionClick = (section: string) => { + const handleSectionClick = (section) => { setActiveSection(section); }; @@ -23,11 +23,16 @@ export default function NavigationLinks() { }, }; + const handleToolsClick = () => { + document.title = "AI Fusion - Tools"; + }; - const handleClick = (event: React.MouseEvent, title: string) => { - event.preventDefault(); + const handlePromptsClick = () => { + document.title = "AI Fusion - Prompts"; + }; - document.title = `AI Fusion | ${title}`; + const handleDatasetsClick = () => { + document.title = "AI Fusion - Datasets"; }; return ( @@ -38,40 +43,43 @@ export default function NavigationLinks() { >
{ + onClick={() => { handleSectionClick("tools"); - handleClick(event, "Tools"); + handleToolsClick(); }} > Tools { + onClick={() => { handleSectionClick("prompts"); - handleClick(event, "Prompts"); + handlePromptsClick(); }} > Prompts { + onClick={() => { handleSectionClick("datasets"); - handleClick(event, "Datasets"); + handleDatasetsClick(); }} > Datasets