Function: useChangelog()
useChangelog(
uri,options):UseQueryResult<OutputSchema,APIError>
Defined in: web/lib/hooks/use-eprint-mutations.ts:504
Fetches a single changelog by its AT Protocol URI.
Parameters
uri
string
AT Protocol URI of the changelog record
options
UseChangelogOptions = {}
Query options
Returns
UseQueryResult<OutputSchema, APIError>
Query result with changelog data, loading state, and error
Remarks
Uses TanStack Query with a 5-minute stale time. Changelogs are immutable records, so caching is highly effective.
Example
const { data: changelog, isLoading, error } = useChangelog(
'at://did:plc:abc/pub.chive.eprint.changelog/123'
);
if (isLoading) return <ChangelogSkeleton />;
if (error) return <ChangelogError error={error} />;
return (
<ChangelogDetail
version={formatVersion(changelog.version)}
summary={changelog.summary}
sections={changelog.sections}
createdAt={changelog.createdAt}
/>
);