Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download web_app/src/hooks/useTopicOutcomes.ts from CommunityOne/open-navigator: direct link, hf CLI and curl.
- Browser
- Download file 588 Bytes
-
https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/hooks/useTopicOutcomes.ts
- Command line
-
hf download hf://spaces/CommunityOne/open-navigator/web_app/src/hooks/useTopicOutcomes.ts
-
curl -L -o useTopicOutcomes.ts https://huggingface.co/spaces/CommunityOne/open-navigator/resolve/main/web_app/src/hooks/useTopicOutcomes.ts
588 Bytes
| import { useQuery } from '@tanstack/react-query' | |
| import { fetchTopicOutcomes, type TopicOutcomesResponse } from '../api/topicOutcomes' | |
| /** The chain from meeting to outcome (#1314): one cache entry for the screen, its headline and the home card. */ | |
| export function useTopicOutcomes(topic: string, stateCode?: string | null, city?: string | null) { | |
| return useQuery<TopicOutcomesResponse>({ | |
| queryKey: ['topic-outcomes', topic, stateCode ?? '', (stateCode && city) || ''], | |
| queryFn: () => fetchTopicOutcomes(topic, stateCode, city), | |
| staleTime: 5 * 60_000, | |
| retry: 1, | |
| }) | |
| } | |