Function
card
(
id: string,
title: string,
tags: string[],
Component: any,
extras: { pick?: any; fallback?: any } = {},
)
Source from the content-addressed store, hash-verified
| 54 | }; |
| 55 | |
| 56 | const card = ( |
| 57 | id: string, |
| 58 | title: string, |
| 59 | tags: string[], |
| 60 | Component: any, |
| 61 | extras: { pick?: any; fallback?: any } = {}, |
| 62 | ) => ({ id, title, tags, Component, ...extras }); |
| 63 | |
| 64 | // Pick a child key of the raw response, null when missing so cards hide cleanly |
| 65 | const at = (key: string) => (raw: any) => raw?.[key] ?? null; |
Tested by
no test coverage detected