diff --git a/app/soapbox/queries/trends.ts b/app/soapbox/queries/trends.ts index 8613719b0..afe780991 100644 --- a/app/soapbox/queries/trends.ts +++ b/app/soapbox/queries/trends.ts @@ -11,7 +11,7 @@ export default function useTrends() { const dispatch = useAppDispatch(); const getTrends = async() => { - const { data } = await api.get('/api/v1/trends'); + const { data } = await api.get('/api/v1/trends'); dispatch(fetchTrendsSuccess(data)); @@ -19,10 +19,10 @@ export default function useTrends() { return normalizedData; }; - const result = useQuery(['trends'], getTrends, { + const result = useQuery>(['trends'], getTrends, { placeholderData: [], staleTime: 600000, // 10 minutes }); return result; -} \ No newline at end of file +}