Skip to content

Commit

Permalink
chore: ActionDialogContentの早期returnを調整する
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Jan 23, 2025
1 parent 251f843 commit c6f4417
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ActionDialogContent: React.FC<Props & ElementProps> = ({
actionText,
actionTheme,
onClickAction,
actionDisabled = false,
actionDisabled,
portalParent,
className = '',
decorators,
Expand All @@ -30,17 +30,15 @@ export const ActionDialogContent: React.FC<Props & ElementProps> = ({
const { createPortal } = useDialogPortal(portalParent)

const handleClickClose = useCallback(() => {
if (!active) {
return
if (active) {
onClickClose()
}
onClickClose()
}, [active, onClickClose])

const handleClickAction = useCallback(() => {
if (!active) {
return
if (active) {
onClickAction(onClickClose)
}
onClickAction(onClickClose)
}, [active, onClickAction, onClickClose])

const titleId = useId()
Expand Down

0 comments on commit c6f4417

Please sign in to comment.