From c416938ff9cad96ffa8da5ab29ff36363f3e6a95 Mon Sep 17 00:00:00 2001 From: Juliet Date: Sun, 12 Oct 2025 13:49:38 +0200 Subject: [PATCH] fix backlink type --- src/components/backlinks.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) 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)}
-- 2.51.2