From edcd2350a560e810197cc6701320937a31c6bb1a Mon Sep 17 00:00:00 2001
From: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
Date: Tue, 27 Aug 2024 18:27:25 -0500
Subject: [PATCH] Fix unreleased bug in dashboard page UI that caused re-render
loop (#21616)
---
frontend/pages/DashboardPage/DashboardPage.tsx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/frontend/pages/DashboardPage/DashboardPage.tsx b/frontend/pages/DashboardPage/DashboardPage.tsx
index db5a426a1c..ae5eb5b5fd 100644
--- a/frontend/pages/DashboardPage/DashboardPage.tsx
+++ b/frontend/pages/DashboardPage/DashboardPage.tsx
@@ -4,6 +4,7 @@ import React, {
useEffect,
useRef,
useCallback,
+ useMemo,
} from "react";
import { InjectedRouter } from "react-router";
import { useQuery } from "react-query";
@@ -652,14 +653,19 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
),
});
- const MunkiCard = useInfoCard({
- title: "Munki",
- titleDetail: (
+ const munkiTitleDetail = useMemo(
+ () => (