fix: typos in Anvils and fetcher

main
Josue 4 years ago committed by Tsu-ba-me
parent 4d2c140234
commit 1ed509e497
  1. 5
      striker-ui/components/Anvils/index.tsx
  2. 2
      striker-ui/lib/fetchers/periodicFetch.ts

@ -10,16 +10,13 @@ const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => {
list?.anvils.forEach((anvil: AnvilListItem) => {
const { data } = PeriodicFetch<AnvilStatus>(
`${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 (
<Panel>
<SelectedAnvil list={anvils} />

@ -5,7 +5,7 @@ const PeriodicFetch = <T>(
url: string,
refreshInterval = 5000,
): GetResponses => {
const { data, error } = useSWR<T>(`${url}`, fetcher, {
const { data, error } = useSWR<T>(url, fetcher, {
refreshInterval,
});
return {

Loading…
Cancel
Save