From ec891b28b67d9dad4a5dfb5a1a627b787e236503 Mon Sep 17 00:00:00 2001
From: Jesse Brault
Date: Fri, 2 Aug 2024 15:15:55 -0500
Subject: [PATCH] Better errorComponent for Recipe page.
---
src/routes/_auth/recipes_/$username.$slug.tsx | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/routes/_auth/recipes_/$username.$slug.tsx b/src/routes/_auth/recipes_/$username.$slug.tsx
index 47f9913..4ae6b1b 100644
--- a/src/routes/_auth/recipes_/$username.$slug.tsx
+++ b/src/routes/_auth/recipes_/$username.$slug.tsx
@@ -33,6 +33,12 @@ export const Route = createFileRoute('/_auth/recipes/$username/$slug')({
{error.status}: {error.message}
)
+ } else if (error instanceof Error) {
+ return (
+
+ {error.name}: {error.message}
+
+ )
}
return
},