@@ -8,6 +8,7 @@ import solidityScanIcon from 'icons/brands/solidity_scan.svg';
88import useFetchReport from 'lib/solidityScan/useFetchReport' ;
99import { Link } from 'toolkit/chakra/link' ;
1010import { PopoverBody , PopoverContent , PopoverRoot } from 'toolkit/chakra/popover' ;
11+ import { useDisclosure } from 'toolkit/hooks/useDisclosure' ;
1112import SolidityscanReportButton from 'ui/shared/solidityscanReport/SolidityscanReportButton' ;
1213import SolidityscanReportDetails from 'ui/shared/solidityscanReport/SolidityscanReportDetails' ;
1314import SolidityscanReportScore from 'ui/shared/solidityscanReport/SolidityscanReportScore' ;
@@ -17,7 +18,7 @@ interface Props {
1718}
1819
1920const SolidityscanReport = ( { hash } : Props ) => {
20-
21+ const popover = useDisclosure ( ) ;
2122 const { data, isPlaceholderData, isError } = useFetchReport ( { hash } ) ;
2223
2324 if ( isError || ! data ) {
@@ -35,10 +36,11 @@ const SolidityscanReport = ({ hash }: Props) => {
3536 const vulnerabilitiesCount = vulnerabilitiesCounts . reduce ( ( acc , val ) => acc + val , 0 ) ;
3637
3738 return (
38- < PopoverRoot >
39+ < PopoverRoot open = { popover . open } onOpenChange = { popover . onOpenChange } >
3940 < SolidityscanReportButton
4041 score = { score }
4142 isLoading = { isPlaceholderData }
43+ tooltipDisabled = { popover . open }
4244 />
4345 < PopoverContent w = { { base : '100vw' , lg : '328px' } } >
4446 < PopoverBody textStyle = "sm" >
0 commit comments