feat: Projekt von JavaScript zu TypeScript migriert

This commit is contained in:
Ismail Ali
2025-01-25 00:20:19 +01:00
parent fde7cf33c4
commit 4f809877ea
45 changed files with 579 additions and 291 deletions

17
pages/index.tsx Normal file
View File

@@ -0,0 +1,17 @@
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
}