diff --git a/striker-ui/components/Anvils/index.tsx b/striker-ui/components/Anvils/index.tsx index cf274aa6..3dd6f7ae 100644 --- a/striker-ui/components/Anvils/index.tsx +++ b/striker-ui/components/Anvils/index.tsx @@ -10,16 +10,13 @@ const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => { list?.anvils.forEach((anvil: AnvilListItem) => { const { data } = PeriodicFetch( - `${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid= - ${anvil.anvil_uuid}`, + `${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid=${anvil.anvil_uuid}`, ); - /* eslint-disable no-param-reassign */ anvils.push({ ...anvil, anvil_state: data?.anvil_state, }); }); - return ( diff --git a/striker-ui/lib/fetchers/periodicFetch.ts b/striker-ui/lib/fetchers/periodicFetch.ts index 5379f462..d65a96a5 100644 --- a/striker-ui/lib/fetchers/periodicFetch.ts +++ b/striker-ui/lib/fetchers/periodicFetch.ts @@ -5,7 +5,7 @@ const PeriodicFetch = ( url: string, refreshInterval = 5000, ): GetResponses => { - const { data, error } = useSWR(`${url}`, fetcher, { + const { data, error } = useSWR(url, fetcher, { refreshInterval, }); return {