mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-23 22:15:16 +00:00
fix: enhance back navigation in NotFoundPage component and remove unused deps (#9341)
* fix: enhance back navigation in NotFoundPage component * chore: update dependencies and refactor imports - Updated `framer-motion` to version `12.23.12` in `package.json` and `bun.lock`. - Removed unused dependencies: `fuse.js`, `react-code-blocks`, `react-datepicker`, `pocketbase`, `simple-icons`. - Refactored import in `number-ticker.tsx` to use `motion/react` instead of `framer-motion`. - Removed CSS import for `react-datepicker` in `page.tsx`. * 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. * update bun.lock
This commit is contained in:
850
frontend/bun.lock
generated
850
frontend/bun.lock
generated
File diff suppressed because it is too large
Load Diff
6
frontend/package.json
generated
6
frontend/package.json
generated
@@ -37,6 +37,7 @@
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.1.1",
|
||||
"date-fns": "^4.1.0",
|
||||
|
||||
"framer-motion": "^11.18.2",
|
||||
"fuse.js": "^7.1.0",
|
||||
"lucide-react": "^0.554.0",
|
||||
@@ -45,20 +46,15 @@
|
||||
"next": "15.5.2",
|
||||
"next-themes": "^0.4.4",
|
||||
"nuqs": "^2.4.1",
|
||||
"pocketbase": "^0.21.5",
|
||||
"prettier-plugin-organize-imports": "^4.1.0",
|
||||
"react": "19.0.0",
|
||||
"react-chartjs-2": "^5.3.0",
|
||||
"react-code-blocks": "^0.1.6",
|
||||
"react-datepicker": "^7.6.0",
|
||||
"react-day-picker": "^9.4.3",
|
||||
"react-dom": "19.0.0",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-simple-typewriter": "^5.0.1",
|
||||
"react-use-measure": "^2.1.7",
|
||||
"recharts": "2.15.4",
|
||||
"sharp": "^0.33.5",
|
||||
"simple-icons": "^13.21.0",
|
||||
"sonner": "^1.7.4",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
"zod": "^3.24.2"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { basePath } from "@/config/site-config";
|
||||
|
||||
export default function NotFoundPage() {
|
||||
return (
|
||||
@@ -12,7 +13,17 @@ export default function NotFoundPage() {
|
||||
Oops, the page you are looking for could not be found.
|
||||
</p>
|
||||
</div>
|
||||
<Button onClick={() => window.history.back()} variant="secondary">
|
||||
<Button
|
||||
onClick={() => {
|
||||
if (window.history.length > 1) {
|
||||
window.history.back();
|
||||
}
|
||||
else {
|
||||
window.location.href = `/${basePath}`;
|
||||
}
|
||||
}}
|
||||
variant="secondary"
|
||||
>
|
||||
Go Back
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useInView, useMotionValue, useSpring } from "framer-motion";
|
||||
import { useInView, useMotionValue, useSpring } from "motion/react";
|
||||
import { useEffect, useRef } from "react";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
@@ -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