fix: update NotFoundPage redirection to use basePath from site-config

- Modified the redirection logic in NotFoundPage to use the basePath variable.
- Set default basePath to "ProxmoxVE" in site-config for improved routing consistency.
This commit is contained in:
Bram Suurd
2025-11-21 23:10:40 +01:00
parent b32633fd95
commit daa7f7820d
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
"use client"; "use client";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { basePath } from "@/config/site-config";
export default function NotFoundPage() { export default function NotFoundPage() {
return ( return (
@@ -18,7 +19,7 @@ export default function NotFoundPage() {
window.history.back(); window.history.back();
} }
else { else {
window.location.href = "/"; window.location.href = `/${basePath}`;
} }
}} }}
variant="secondary" variant="secondary"

View File

@@ -5,7 +5,7 @@ import React from "react";
import type { OperatingSystem } from "@/lib/types"; import type { OperatingSystem } from "@/lib/types";
// eslint-disable-next-line node/no-process-env // eslint-disable-next-line node/no-process-env
export const basePath = process.env.BASE_PATH || ""; export const basePath = process.env.BASE_PATH || "ProxmoxVE";
export const navbarLinks = [ export const navbarLinks = [
{ {