fix: typo in one of the parameters

main
Josue 4 years ago committed by Tsu-ba-me
parent 105d7003d4
commit 8870711a41
  1. 5
      striker-ui/lib/fetchers/periodicFetch.ts

@ -2,14 +2,13 @@ import useSWR from 'swr';
import fetcher from './fetchJSON'; import fetcher from './fetchJSON';
const PeriodicFetch = <T>( const PeriodicFetch = <T>(
url: string,
uuid: string, uuid: string,
uri: string,
refreshInterval = 2000, refreshInterval = 2000,
): GetResponses => { ): GetResponses => {
const { data, error } = useSWR<T>(`${uri}${uuid}`, fetcher, { const { data, error } = useSWR<T>(`${url}${uuid}`, fetcher, {
refreshInterval, refreshInterval,
}); });
return { return {
data, data,
isLoading: !error && !data, isLoading: !error && !data,

Loading…
Cancel
Save