From 4d98046627c451d74212f596dca81b79fd2a2ba1 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 10 Aug 2022 13:27:09 -0400 Subject: [PATCH] Improve types --- app/soapbox/queries/trends.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/soapbox/queries/trends.ts b/app/soapbox/queries/trends.ts index 8613719b08..afe7809919 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 +}