social components
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wrap list items in Maybe implicitly

one bad item shouldn't take down the whole list

+7 -2
+7 -2
app/sandbox/render/list.tsx
··· 3 3 import { deserializeTree } from "@inlay/core"; 4 4 import { resolveEndpoint } from "@inlay/render"; 5 5 import { resolveDidToService } from "@/data/resolve"; 6 + import { MaybeBoundary } from "./client"; 6 7 import { ListClient } from "./list-client"; 7 8 8 9 type ListProps = { ··· 45 46 page.items.forEach((raw, i) => { 46 47 if (i > 0) renderedItems.push(<hr key={`sep-${i}`} />); 47 48 const el = deserializeTree(raw); 48 - renderedItems.push(renderNode(el, ctx)); 49 + renderedItems.push( 50 + <MaybeBoundary fallback={null}>{renderNode(el, ctx)}</MaybeBoundary> 51 + ); 49 52 }); 50 53 51 54 const renderCtx = ctx.render; ··· 65 68 nextPage.items.forEach((raw, i) => { 66 69 items.push(<hr key={`sep-${i}`} />); 67 70 const el = deserializeTree(raw); 68 - items.push(renderNode(el, hostCtx)); 71 + items.push( 72 + <MaybeBoundary fallback={null}>{renderNode(el, hostCtx)}</MaybeBoundary> 73 + ); 69 74 }); 70 75 71 76 return {