From 8fd0f904722f42503e9673163001811e165d9a86 Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Sat, 1 Mar 2025 19:10:49 -0600 Subject: [PATCH] fix(www): 404 null error #4 --- .yarnrc.yml | 8 ++++++++ apps/www/src/app/error.tsx | 29 +++++++++++++++++++++++++++++ apps/www/src/app/not-found.tsx | 28 ++++++++++++++++------------ package.json | 5 +---- 4 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 .yarnrc.yml create mode 100644 apps/www/src/app/error.tsx diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..e3bfe55 --- /dev/null +++ b/.yarnrc.yml @@ -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 \ No newline at end of file diff --git a/apps/www/src/app/error.tsx b/apps/www/src/app/error.tsx new file mode 100644 index 0000000..ef42605 --- /dev/null +++ b/apps/www/src/app/error.tsx @@ -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 ( +
+
+

Something went wrong!

+ +
+
+ ); +} \ No newline at end of file diff --git a/apps/www/src/app/not-found.tsx b/apps/www/src/app/not-found.tsx index 54f9cd5..3261c72 100644 --- a/apps/www/src/app/not-found.tsx +++ b/apps/www/src/app/not-found.tsx @@ -28,18 +28,22 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -"use client"; - -export default function NotFound() { +export default async function NotFound() { return ( -
-
-

404 - Page not found

-

We couldn't find the page you were looking for.

- - Return home - -
-
+ + +
+
+

404 - Page Not Found

+

+ The page you are looking for could not be found. +

+ + Return to Home + +
+
+ + ); } diff --git a/package.json b/package.json index e194494..c611414 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,5 @@ "node": ">=18" }, "packageManager": "yarn@1.22.22", - "workspaces": [ - "apps/*", - "packages/*" - ] + "workspaces": ["apps/*", "packages/*"] }