From 13182d482464b93bb6ce8452d52437186527a894 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Thu, 8 Jun 2023 12:51:20 -0400 Subject: [PATCH] Fix job logs table --- src/pages/container/EventsTable/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/container/EventsTable/index.tsx b/src/pages/container/EventsTable/index.tsx index de07f45766..58ef67d16d 100644 --- a/src/pages/container/EventsTable/index.tsx +++ b/src/pages/container/EventsTable/index.tsx @@ -1,3 +1,4 @@ +import { useMemo } from "react"; import { useQuery } from "@apollo/client"; import styled from "@emotion/styled"; import { @@ -44,7 +45,12 @@ const EventsTable: React.VFC<{}> = () => { ); }, }); - const { count, eventLogEntries } = podEventsData?.pod.events ?? {}; + + const { eventLogEntries, count } = useMemo( + () => podEventsData?.pod.events ?? { eventLogEntries: [], count: 0 }, + [podEventsData?.pod?.events] + ); + return (