🚨chore: swalFire alert 일경우 리턴 함수 추가

This commit is contained in:
yoosangwook 2025-01-02 10:58:54 +09:00
parent 974a380e75
commit a7365b98e4
2 changed files with 7 additions and 0 deletions

View File

@ -520,6 +520,11 @@ export default function Playground() {
<div className="my-2">
<p>{managementStateLoaded?.objectNo}</p>
</div>
<div className="my-2">
<Button onClick={() => swalFire({ text: 'alert 테스트입니다.', type: 'alert', confirmFn: () => console.log('Alert!!!') })}>
Sweetalert - alert
</Button>
</div>
</div>
</>
)

View File

@ -21,6 +21,8 @@ export const useSwal = () => {
text,
icon: icon === '' ? 'success' : icon,
confirmButtonText: '확인',
}).then(() => {
confirmFn()
})
} else if (type === 'confirm') {
MySwal.fire({