From 6b2d3700f9c03831dc0006bb5630532e9234eb0a Mon Sep 17 00:00:00 2001 From: Josue Date: Thu, 27 May 2021 18:42:30 -0400 Subject: [PATCH] fix: use host_uuid instead of index number to determine server's host --- striker-ui/components/Servers.tsx | 9 ++++----- striker-ui/types/AnvilServers.d.ts | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/striker-ui/components/Servers.tsx b/striker-ui/components/Servers.tsx index 8c92b535..08dfc6d4 100644 --- a/striker-ui/components/Servers.tsx +++ b/striker-ui/components/Servers.tsx @@ -88,14 +88,13 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => { anvil[ anvil.findIndex((a) => a.anvil_uuid === uuid) ].hosts.map( - ( - host: AnvilStatusHost, - index: number, - ): JSX.Element => ( + (host: AnvilStatusHost): JSX.Element => ( ), diff --git a/striker-ui/types/AnvilServers.d.ts b/striker-ui/types/AnvilServers.d.ts index 4fd2b19a..96413218 100644 --- a/striker-ui/types/AnvilServers.d.ts +++ b/striker-ui/types/AnvilServers.d.ts @@ -10,7 +10,7 @@ declare type AnvilServer = { | 'crashed' | 'pmsuspended' | 'migrating'; - server_host_index: number; + server_host_uuid: string; }; declare type AnvilServers = {