Skip to content

Commit d474d1e

Browse files
Feat/enhanced error message (#800)
* This commit enhances the error-message component to show more details about the error. * This commit places the outlet outside the map component so that the nested components are rendered properly. --------- Co-authored-by: jona159 <65068389+jona159@users.noreply.github.com>
1 parent aea2052 commit d474d1e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

app/components/error-message.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function ErrorMessage() {
2727
const error = useRouteError()
2828
const { t } = useTranslation('common')
2929

30-
const goBack = () => navigate(-1)
30+
const goBack = () => window.history.back()
3131
const goHome = () => navigate('/')
3232
const refresh = () => window.location.reload()
3333

@@ -157,7 +157,7 @@ export default function ErrorMessage() {
157157
return (
158158
<div className="flex min-h-[400px] w-full items-center justify-center p-4">
159159
<Card
160-
className={`w-full max-w-md bg-gradient-to-br ${getGradient()} shadow-lg`}
160+
className={`w-full max-w-md bg-gradient-to-br ${getGradient()} shadow-2xl border-2 border-white/60 dark:border-zinc-700/80 backdrop-blur-sm ring-1 ring-black/10`}
161161
>
162162
<CardHeader className="text-center">
163163
<div className="mx-auto mb-4 flex h-20 w-20 items-center justify-center rounded-full bg-white shadow-md dark:bg-zinc-800">

app/routes/explore.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,12 @@ export default function Explore() {
410410
{/* <ClusterLayer
411411
devices={filterOptionsOn ? GlobalFilteredDevices : data.devices}
412412
/> */}
413-
<Outlet />
414413
</Map>
414+
<div className="pointer-events-none absolute inset-0 z-10">
415+
<div className="pointer-events-auto">
416+
<Outlet />
417+
</div>
418+
</div>
415419
</MapProvider>
416420
</div>
417421
)

0 commit comments

Comments
 (0)