From ea0915e23b26313915b5a71046458b65d5a09098 Mon Sep 17 00:00:00 2001 From: Kaspryk Date: Wed, 27 Mar 2024 12:05:10 -0700 Subject: [PATCH] updating to use useCallback for Storage Trends chart --- .../src/components/dashboard/Dashboard.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/dashboard/src/components/dashboard/Dashboard.tsx b/src/dashboard/src/components/dashboard/Dashboard.tsx index dd14998..e0cf687 100644 --- a/src/dashboard/src/components/dashboard/Dashboard.tsx +++ b/src/dashboard/src/components/dashboard/Dashboard.tsx @@ -173,8 +173,8 @@ export const Dashboard = () => { [download], ); - const renderStorageTrendsChart = (isLarge: boolean) => { - return ( + const renderStorageTrendsChart = React.useCallback( + (isLarge: Boolean) => ( { }); }} /> - ); - }; + ), + [ + dashboardServerItem, + dashboardServerItems, + dashboardTenant, + dashboardOrganization, + dashboardOperatingSystemItem, + handleExport, + ] + ); return ( <>