From 3fff54e1262671c8a1d378da1ebf1a156b1aa4c0 Mon Sep 17 00:00:00 2001 From: mluena Date: Mon, 26 Feb 2024 11:36:28 +0100 Subject: [PATCH] error page --- client/src/app/error.tsx | 10 ++++++++++ client/src/app/not-found.tsx | 15 ++++++++++++--- .../containers/datasets/layers/projects/layer.tsx | 2 ++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 client/src/app/error.tsx diff --git a/client/src/app/error.tsx b/client/src/app/error.tsx new file mode 100644 index 00000000..1cd5618f --- /dev/null +++ b/client/src/app/error.tsx @@ -0,0 +1,10 @@ +'use client'; + +export default function Error({ error }: { error: Error }) { + return ( +
+

Something went wrong!

+
{error.message}
+
+ ); +} diff --git a/client/src/app/not-found.tsx b/client/src/app/not-found.tsx index 1053a555..60143f49 100644 --- a/client/src/app/not-found.tsx +++ b/client/src/app/not-found.tsx @@ -1,11 +1,20 @@ import Link from 'next/link'; +import { Button } from '@/components/ui/button'; + export default function NotFound() { return (
-

Not Found

-

Could not find requested resource

- Return Home +

404

+

Page not found

+

+ It looks like the links is broken or the page has been removed. +

+ + +
); } diff --git a/client/src/containers/datasets/layers/projects/layer.tsx b/client/src/containers/datasets/layers/projects/layer.tsx index 176a3a77..a9b2d523 100644 --- a/client/src/containers/datasets/layers/projects/layer.tsx +++ b/client/src/containers/datasets/layers/projects/layer.tsx @@ -1,3 +1,5 @@ +'use client'; + import { Layer, Source } from 'react-map-gl'; import { GeoJSONSourceRaw, GeoJSONSourceOptions, CircleLayer } from 'mapbox-gl';