|
|
@ -10,16 +10,13 @@ const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => { |
|
|
|
|
|
|
|
|
|
|
|
list?.anvils.forEach((anvil: AnvilListItem) => { |
|
|
|
list?.anvils.forEach((anvil: AnvilListItem) => { |
|
|
|
const { data } = PeriodicFetch<AnvilStatus>( |
|
|
|
const { data } = PeriodicFetch<AnvilStatus>( |
|
|
|
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid=
|
|
|
|
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid=${anvil.anvil_uuid}`, |
|
|
|
${anvil.anvil_uuid}`,
|
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
/* eslint-disable no-param-reassign */ |
|
|
|
|
|
|
|
anvils.push({ |
|
|
|
anvils.push({ |
|
|
|
...anvil, |
|
|
|
...anvil, |
|
|
|
anvil_state: data?.anvil_state, |
|
|
|
anvil_state: data?.anvil_state, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Panel> |
|
|
|
<Panel> |
|
|
|
<SelectedAnvil list={anvils} /> |
|
|
|
<SelectedAnvil list={anvils} /> |
|
|
|