feat: add error handling to Await component in carousel and category sections

This commit is contained in:
Ardeman
2025-03-20 16:01:13 +08:00
parent 09f8669553
commit 2f8b5dbe0f
3 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -74,7 +74,10 @@ export const CarouselHero = (properties: TNews) => {
>
<div className="embla__container hero flex sm:gap-x-8">
<Suspense fallback={<div>Loading...</div>}>
<Await resolve={items}>
<Await
resolve={items}
errorElement={<div>Oops!</div>}
>
{(value) =>
value.data.map(
(