Function: useBacklinkCounts()
useBacklinkCounts(
targetUri,options):UseQueryResult<BacklinkCounts,Error>
Defined in: web/lib/hooks/use-backlinks.ts:163
Fetches aggregated backlink counts for an eprint.
Parameters
targetUri
string
AT URI of the eprint to get counts for
options
UseBacklinkCountsOptions = {}
Query options
Returns
UseQueryResult<BacklinkCounts, Error>
Query result with backlink counts
Remarks
Returns counts by source type (Cosmik, Bluesky, WhiteWind, Leaflet, etc.) and a total count. Useful for displaying summary badges.
Example
const { data: counts, isLoading } = useBacklinkCounts(eprintUri);
console.log(counts?.total, 'total backlinks');