From 24e4509c8d8aea77d9de0365a015b2c9ec66f27f Mon Sep 17 00:00:00 2001 From: Josue Date: Thu, 27 May 2021 18:31:59 -0400 Subject: [PATCH] refactor: add reserved prop to Memory component --- striker-ui/components/Memory.tsx | 7 +++++-- striker-ui/types/AnvilMemory.d.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/striker-ui/components/Memory.tsx b/striker-ui/components/Memory.tsx index 5360a4e6..44aab3e8 100644 --- a/striker-ui/components/Memory.tsx +++ b/striker-ui/components/Memory.tsx @@ -13,7 +13,8 @@ const Memory = (): JSX.Element => { `${process.env.NEXT_PUBLIC_API_URL}/get_memory?anvil_uuid=${uuid}`, ); - const memoryData = isLoading || !data ? { total: 0, allocated: 0 } : data; + const memoryData = + isLoading || !data ? { total: 0, allocated: 0, reserved: 0 } : data; return ( @@ -46,7 +47,9 @@ const Memory = (): JSX.Element => { diff --git a/striker-ui/types/AnvilMemory.d.ts b/striker-ui/types/AnvilMemory.d.ts index 2fe1c2cb..1f538c81 100644 --- a/striker-ui/types/AnvilMemory.d.ts +++ b/striker-ui/types/AnvilMemory.d.ts @@ -1,4 +1,5 @@ declare type AnvilMemory = { total: number; allocated: number; + reserved: number; };