chore: lint && format codebase

This commit is contained in:
Thomas Camlong
2025-11-17 10:02:19 +01:00
parent 0189450e8c
commit 2863cfd96d
9 changed files with 18 additions and 30 deletions

View File

@@ -127,19 +127,15 @@ async function fetchAuthorData(authorId: number) {
* Uses unstable_cache with tags for on-demand revalidation
* Revalidates every 86400 seconds (24 hours)
* Cache key: author-{authorId}
*
*
* This prevents hitting GitHub API rate limits by caching author data
* across multiple page builds and requests.
*/
export async function getAuthorData(authorId: number): Promise<AuthorData> {
return unstable_cache(
async () => await fetchAuthorData(authorId),
[`author-${authorId}`],
{
revalidate: 86400,
tags: ["authors", `author-${authorId}`],
}
)()
return unstable_cache(async () => await fetchAuthorData(authorId), [`author-${authorId}`], {
revalidate: 86400,
tags: ["authors", `author-${authorId}`],
})()
}
/**