diff --git a/components/Navigation.jsx b/components/Navigation.jsx index dcb11e4..f65a3f5 100644 --- a/components/Navigation.jsx +++ b/components/Navigation.jsx @@ -1,4 +1,4 @@ -"use client"; +"use client"; // components/Navigation.jsx import React, { useEffect, useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; @@ -13,7 +13,12 @@ function Navigation() { } }, [pathname]); - // Menüeinträge ohne .html-Endungen für SPA-Navigation + // Funktion, die das ".html" basierend auf der Umgebung hinzufügt + const formatPath = (path) => { + return process.env.NODE_ENV === "production" ? `${path}.html` : path; + }; + + // Menüeinträge ohne .html-Endungen für die Entwicklungsumgebung const menuItems = [ { name: "Übersicht", path: "/dashboard" }, { name: "Kabelüberwachung", path: "/kabelueberwachung" }, @@ -24,7 +29,7 @@ function Navigation() {