diff --git a/src/components/backlinks.tsx b/src/components/backlinks.tsx index 0f0fb03..e6e8c9f 100644 --- a/src/components/backlinks.tsx +++ b/src/components/backlinks.tsx @@ -10,9 +10,14 @@ import { import { localDateFromTimestamp } from "../utils/date.js"; import { Button } from "./button.jsx"; -// the actual backlink api will probably become closer to this +type Backlink = { + collection: string; + path: string; + counts: { distinct_dids: number; records: number }; +}; + const linksBySource = (links: Record) => { - let out: any[] = []; + let out: Backlink[] = []; Object.keys(links) .toSorted() .forEach((collection) => { @@ -50,12 +55,18 @@ const Backlinks = (props: { target: string }) => { {({ collection, path, counts }) => (
-
- +
+ {collection}
-
- +
+ {path.slice(1)}