feat: add error handling to Await component in carousel and category sections
This commit is contained in:
@@ -43,7 +43,10 @@ export const CategorySection = (properties: TNews) => {
|
||||
|
||||
<div className="grid sm:grid-cols-3 sm:gap-x-8">
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Await resolve={items}>
|
||||
<Await
|
||||
resolve={items}
|
||||
errorElement={<div>Oops!</div>}
|
||||
>
|
||||
{(value) =>
|
||||
value.data.map(
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user