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 * 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
32 lines
891 B
TypeScript
32 lines
891 B
TypeScript
"use client";
|
|
import { Button } from "@/components/ui/button";
|
|
import { basePath } from "@/config/site-config";
|
|
|
|
export default function NotFoundPage() {
|
|
return (
|
|
<div className="flex h-screen w-full flex-col items-center justify-center gap-5 bg-background px-4 md:px-6">
|
|
<div className="space-y-2 text-center">
|
|
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl md:text-6xl">
|
|
404
|
|
</h1>
|
|
<p className="text-muted-foreground md:text-xl">
|
|
Oops, the page you are looking for could not be found.
|
|
</p>
|
|
</div>
|
|
<Button
|
|
onClick={() => {
|
|
if (window.history.length > 1) {
|
|
window.history.back();
|
|
}
|
|
else {
|
|
window.location.href = `/${basePath}`;
|
|
}
|
|
}}
|
|
variant="secondary"
|
|
>
|
|
Go Back
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|