From ccffd41024845f796f082e032d5850ae0500a5f2 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Tue, 24 Oct 2023 09:06:16 -0700 Subject: [PATCH] added error page --- app/error.tsx | 13 +++++++++++++ next.config.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 app/error.tsx diff --git a/app/error.tsx b/app/error.tsx new file mode 100644 index 00000000..4c8fa899 --- /dev/null +++ b/app/error.tsx @@ -0,0 +1,13 @@ +"use client"; + +const Error = ({error, reset}: { error: Error; reset: () => void }) => { + console.error(error.message); + return ( +
+

Something went wrong!

+ Apologies, an error occurred when attempting to preset the page you are attempting to view. Please try a different + path. + +
+ ) +} diff --git a/next.config.js b/next.config.js index e5f8a425..2189a1cc 100644 --- a/next.config.js +++ b/next.config.js @@ -26,7 +26,7 @@ const nextConfig = { }, async redirects() { const devRedirects = []; - if (process.env.DEV === 'true') { + if (process.env.NODE_ENV === 'development') { devRedirects.push({ source: '/style-guide', destination: 'http://localhost:6006',