fix(www): 404 null error #4

This commit is contained in:
dvelo 2025-03-01 19:10:49 -06:00
parent 5a95f5edd8
commit 8fd0f90472
4 changed files with 54 additions and 16 deletions

8
.yarnrc.yml Normal file

@ -0,0 +1,8 @@
nodeLinker: node-modules
enableGlobalCache: true
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-1.22.22.cjs

@ -0,0 +1,29 @@
'use client';
import { useEffect } from 'react';
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<div className="min-h-screen flex items-center justify-center flex-col">
<div className="text-center">
<h2 className="text-4xl font-bold mb-4">Something went wrong!</h2>
<button
onClick={reset}
className="text-blue-500 hover:underline"
>
Try again
</button>
</div>
</div>
);
}

@ -28,18 +28,22 @@
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */
"use client"; export default async function NotFound() {
export default function NotFound() {
return ( return (
<html>
<body>
<div className="min-h-screen flex items-center justify-center flex-col"> <div className="min-h-screen flex items-center justify-center flex-col">
<div className="text-center"> <div className="text-center">
<h1 className="text-4xl font-bold mb-4">404 - Page not found</h1> <h1 className="text-4xl font-bold mb-4">404 - Page Not Found</h1>
<p className="mb-4">We couldn't find the page you were looking for.</p> <p className="mb-4">
The page you are looking for could not be found.
</p>
<a href="/" className="text-blue-500 hover:underline"> <a href="/" className="text-blue-500 hover:underline">
Return home Return to Home
</a> </a>
</div> </div>
</div> </div>
</body>
</html>
); );
} }

@ -16,8 +16,5 @@
"node": ">=18" "node": ">=18"
}, },
"packageManager": "yarn@1.22.22", "packageManager": "yarn@1.22.22",
"workspaces": [ "workspaces": ["apps/*", "packages/*"]
"apps/*",
"packages/*"
]
} }