Skip to content

Commit

Permalink
refac
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Jan 21, 2025
1 parent 7bcd007 commit e207dfa
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -182,9 +180,7 @@ const DevToolsPopover = ({
<IndicatorRow
label="Issues"
value={<IssueCount count={issueCount} />}
onClick={
issueCount > 0 ? () => setIsErrorOverlayOpen(true) : undefined
}
onClick={onIssuesClick}
/>
</div>
</div>
Expand Down

0 comments on commit e207dfa

Please sign in to comment.