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";
|
"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"
|
||||||
|
|||||||
@@ -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 = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user