From cd7dd1bbcb218d641f336b7ff54584b294f4dced Mon Sep 17 00:00:00 2001 From: Alexandru Cambose Date: Fri, 29 Aug 2025 17:45:12 +0200 Subject: [PATCH] fix: remove useCallback from server comp --- .../src/components/Publisher/layout.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/apps/insights/src/components/Publisher/layout.tsx b/apps/insights/src/components/Publisher/layout.tsx index 30543eef31..7c8c6747a8 100644 --- a/apps/insights/src/components/Publisher/layout.tsx +++ b/apps/insights/src/components/Publisher/layout.tsx @@ -13,7 +13,7 @@ import { StatCard } from "@pythnetwork/component-library/StatCard"; import { lookup } from "@pythnetwork/known-publishers"; import { notFound } from "next/navigation"; import type { ReactNode } from "react"; -import { Suspense, useCallback } from "react"; +import { Suspense } from "react"; import { getPublishers, @@ -109,16 +109,13 @@ const PublisherHeader = ({ const downloadReportForPublisher = useDownloadReportForPublisher(); - const handleDownloadReport = useCallback( - (interval: Interval) => { - return downloadReportForPublisher({ - publisher: publisherKey, - cluster: ClusterToName[cluster], - interval, - }); - }, - [publisherKey, cluster, downloadReportForPublisher], - ); + const handleDownloadReport = (interval: Interval) => { + return downloadReportForPublisher({ + publisher: publisherKey, + cluster: ClusterToName[cluster], + interval, + }); + }; return (