Skip to content

Commit

Permalink
fix: AlertDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jan 1, 2024
1 parent d40a63d commit d082c0a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/neuron-ui/src/widgets/AlertDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const AlertDialog = ({
title,
message,
type,
onClose,
onOk,
onCancel,
action,
Expand All @@ -24,14 +23,13 @@ const AlertDialog = ({
title?: string
message?: string
type: AlertType
onClose?: () => void
onOk?: () => void
onCancel?: () => void
action?: Action
}) => {
const [t] = useTranslation()
const dialogRef = useRef<HTMLDialogElement | null>(null)
useDialog({ show, dialogRef, onClose: onClose || (() => {}) })
useDialog({ show, dialogRef, onClose: onCancel || (() => {}) })
const actions = useMemo<('cancel' | 'ok')[]>(() => {
if (action) {
return action === 'all' ? ['cancel', 'ok'] : [action]
Expand Down

1 comment on commit d082c0a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 7378730452

Please sign in to comment.