From 0893c834614562138c681f5fcc97a708454f246e Mon Sep 17 00:00:00 2001 From: swve Date: Mon, 4 Mar 2024 19:58:49 +0100 Subject: [PATCH] fix: redesign error page and add reload button --- .../components/StyledElements/Error/Error.tsx | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/apps/web/components/StyledElements/Error/Error.tsx b/apps/web/components/StyledElements/Error/Error.tsx index 1d9bee58..ead83f1f 100644 --- a/apps/web/components/StyledElements/Error/Error.tsx +++ b/apps/web/components/StyledElements/Error/Error.tsx @@ -1,18 +1,30 @@ -import { XCircle } from 'lucide-react' +'use client' +import { AlertTriangle, RefreshCcw } from 'lucide-react' +import { useRouter } from 'next/navigation' import React from 'react' + function ErrorUI() { + const router = useRouter() + + function reloadPage() { + router.refresh() + window.location.reload() + } + return ( -
-
-
-
- -
-
-

Error

-

Something went wrong

-
-
+
+
+ +

Something went wrong

+
+
+
)