feat: implement custom error handling in Await components for carousel and category sections

This commit is contained in:
Ardeman
2025-03-20 16:25:34 +08:00
parent 2f8b5dbe0f
commit 06672714b7
4 changed files with 16 additions and 3 deletions
+10
View File
@@ -0,0 +1,10 @@
import { useAsyncError } from 'react-router'
export const ErrorAwait = () => {
const error = useAsyncError()
return (
<p>
{error instanceof Error ? error.message : 'An unexpected error occurred.'}
</p>
)
}