fix(striker-ui): pass data type to SWR config type

main
Tsu-ba-me 2 years ago
parent c63cedb315
commit df70346824
  1. 2
      striker-ui/lib/fetchers/periodicFetch.ts

@ -4,7 +4,7 @@ import fetcher from './fetchJSON';
const periodicFetch = <T>(
url: string,
{ refreshInterval = 5000, onSuccess }: SWRConfiguration = {},
{ refreshInterval = 5000, onSuccess }: SWRConfiguration<T> = {},
): GetResponses<T> => {
// The purpose of react-hooks/rules-of-hooks is to ensure that react hooks
// are called in order (i.e., not potentially skipped due to conditionals).

Loading…
Cancel
Save