Files
CPLv4.0/pages/index.tsx

20 lines
585 B
TypeScript

"use client";
import { useEffect } from "react";
import { useRouter } from "next/router";
export default function Home() {
const router = useRouter();
useEffect(() => {
// Prüft die Umgebung und hängt .html in der Produktion an
const isProduction = process.env.NEXT_PUBLIC_NODE_ENV === "production";
const dashboardPath = `/dashboard${isProduction ? ".html" : ""}`;
// Leitet den Benutzer sofort zur richtigen Dashboard-Seite weiter
router.replace(dashboardPath);
}, [router]);
return null; // Die Seite zeigt keinen Inhalt an und leitet sofort um
}