mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat: migrate GitHub stars fetch to TanStack Query
Replace the manual useEffect + fetch in NavbarGitHubStars with useQuery from @tanstack/react-query. This gives the component caching, request deduplication, automatic retries, and devtools visibility for free. The useLatestRelease hook referenced in the issue has already been removed from hero-section.tsx, so only the stars badge needed migration. Closes #1198
This commit is contained in:
parent
5da2d95d80
commit
9cfaa72325
2 changed files with 21 additions and 22 deletions
|
|
@ -91,6 +91,10 @@ export const cacheKeys = {
|
|||
publicChat: {
|
||||
byToken: (shareToken: string) => ["public-chat", shareToken] as const,
|
||||
},
|
||||
github: {
|
||||
repoStars: (username: string, repo: string) =>
|
||||
["github", "repo-stars", username, repo] as const,
|
||||
},
|
||||
publicChatSnapshots: {
|
||||
all: ["public-chat-snapshots"] as const,
|
||||
bySearchSpace: (searchSpaceId: number) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue