mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-22 05:25:15 +00:00
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:
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { basePath } from "@/config/site-config";
|
||||
|
||||
export default function NotFoundPage() {
|
||||
return (
|
||||
@@ -18,7 +19,7 @@ export default function NotFoundPage() {
|
||||
window.history.back();
|
||||
}
|
||||
else {
|
||||
window.location.href = "/";
|
||||
window.location.href = `/${basePath}`;
|
||||
}
|
||||
}}
|
||||
variant="secondary"
|
||||
|
||||
@@ -5,7 +5,7 @@ import React from "react";
|
||||
import type { OperatingSystem } from "@/lib/types";
|
||||
|
||||
// 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 = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user