Skip to content

Commit 72585c4

Browse files
authored
Merge pull request #3005 from pyth-network/fix/callback
fix: remove useCallback from server comp
2 parents 554e0f4 + cd7dd1b commit 72585c4

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

apps/insights/src/components/Publisher/layout.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { StatCard } from "@pythnetwork/component-library/StatCard";
1313
import { lookup } from "@pythnetwork/known-publishers";
1414
import { notFound } from "next/navigation";
1515
import type { ReactNode } from "react";
16-
import { Suspense, useCallback } from "react";
16+
import { Suspense } from "react";
1717

1818
import {
1919
getPublishers,
@@ -109,16 +109,13 @@ const PublisherHeader = ({
109109

110110
const downloadReportForPublisher = useDownloadReportForPublisher();
111111

112-
const handleDownloadReport = useCallback(
113-
(interval: Interval) => {
114-
return downloadReportForPublisher({
115-
publisher: publisherKey,
116-
cluster: ClusterToName[cluster],
117-
interval,
118-
});
119-
},
120-
[publisherKey, cluster, downloadReportForPublisher],
121-
);
112+
const handleDownloadReport = (interval: Interval) => {
113+
return downloadReportForPublisher({
114+
publisher: publisherKey,
115+
cluster: ClusterToName[cluster],
116+
interval,
117+
});
118+
};
122119

123120
return (
124121
<section className={styles.header}>

0 commit comments

Comments
 (0)