Skip to content

Commit

Permalink
fix(panel): updated 404 page to work on wouter 3
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Oct 4, 2024
1 parent 0f14c48 commit e8b6b42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion panel/src/layout/MainRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default function MainRouter() {
{import.meta.env.DEV && (
<WouterRoute path="/test"><TestingPage /></WouterRoute>
)}
<WouterRoute path="/:fullPath*" component={NotFound} />
<WouterRoute component={NotFound} />
</Switch>
</ErrorBoundary>
);
Expand Down
4 changes: 2 additions & 2 deletions panel/src/pages/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from "wouter";

type Props = {
params: {
fullPath: string;
'*': string;
};
};
export default function NotFound({ params }: Props) {
Expand All @@ -15,7 +15,7 @@ export default function NotFound({ params }: Props) {
<div className="text-center">
<h1 className="bg-fuchsia-600 text-4xl w-fit mx-auto">404 | Not Found</h1>
<p className="mt-2">
The page <InlineCode>/{params.fullPath}</InlineCode> does not seem to be correct.
The page <InlineCode>/{params['*']}</InlineCode> does not seem to be correct.
</p>
<Link href="/" className="text-accent hover:underline">Return to Dashboard?</Link>
</div>
Expand Down

0 comments on commit e8b6b42

Please sign in to comment.