From 0fbad8784cefff8a93656f52ebf84f804607bf89 Mon Sep 17 00:00:00 2001 From: Marcelo Lotif Date: Tue, 17 Sep 2024 10:01:54 -0400 Subject: [PATCH] Applying link fixes --- florist/app/jobs/details/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/florist/app/jobs/details/page.tsx b/florist/app/jobs/details/page.tsx index bfbfad6..7635bb9 100644 --- a/florist/app/jobs/details/page.tsx +++ b/florist/app/jobs/details/page.tsx @@ -173,12 +173,12 @@ export function JobProgress({ serverConfig: string; status: status; }): ReactElement { + const [collapsed, setCollapsed] = useState(true); + if (!serverMetrics || !serverConfig) { return null; } - const [collapsed, setCollapsed] = useState(true); - const serverMetricsJson = JSON.parse(serverMetrics); const serverConfigJson = JSON.parse(serverConfig); @@ -304,12 +304,13 @@ export function JobProgressDetails({ serverMetrics }: { serverMetrics: Object }) } export function JobProgressRound({ roundMetrics, index }: { roundMetrics: Object; index: int }): ReactElement { + + const [collapsed, setCollapsed] = useState(true); + if (!roundMetrics) { return null; } - const [collapsed, setCollapsed] = useState(true); - return (