diff --git a/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.tsx b/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.tsx index a2cf8175f2221..e238741f80d85 100644 --- a/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.tsx +++ b/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/errors/dev-tools-indicator/dev-tools-indicator.tsx @@ -115,12 +115,10 @@ const DevToolsPopover = ({ } }, []) - const togglePopover = () => - setIsPopoverOpen((prev) => { - console.log('togglePopover', prev) - return !prev - }) - const onIssuesClick = () => setIsErrorOverlayOpen(true) + const togglePopover = () => setIsPopoverOpen((prev) => !prev) + const onIssuesClick = () => + issueCount > 0 ? setIsErrorOverlayOpen(true) : null + const onLogoClick = () => { togglePopover() onIssuesClick() @@ -182,9 +180,7 @@ const DevToolsPopover = ({ } - onClick={ - issueCount > 0 ? () => setIsErrorOverlayOpen(true) : undefined - } + onClick={onIssuesClick} />