From cb9d6cba412f9eee45160a93178c235cf5f98e43 Mon Sep 17 00:00:00 2001 From: isstuev Date: Sun, 18 Feb 2024 19:25:01 +0100 Subject: [PATCH] remove double fetch --- ui/address/contract/ContractSecurityAudits.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/address/contract/ContractSecurityAudits.tsx b/ui/address/contract/ContractSecurityAudits.tsx index d33e92e009..1cff14bffb 100644 --- a/ui/address/contract/ContractSecurityAudits.tsx +++ b/ui/address/contract/ContractSecurityAudits.tsx @@ -21,6 +21,7 @@ const ContractSecurityAudits = ({ addressHash }: Props) => { const { data, isPlaceholderData } = useApiQuery('contract_security_audits', { pathParams: { hash: addressHash }, queryOptions: { + refetchOnMount: false, placeholderData: { items: [] }, enabled: Boolean(addressHash), }, @@ -79,4 +80,4 @@ const ContractSecurityAudits = ({ addressHash }: Props) => { ); }; -export default ContractSecurityAudits; +export default React.memo(ContractSecurityAudits);