mirror of
https://github.com/chancehudson/uikit.git
synced 2026-01-10 06:28:09 -05:00
fix: button double call onClick
This commit is contained in:
@@ -40,7 +40,7 @@ export default observer(({
|
||||
setLoading(true)
|
||||
const res = onClick(updateFunc)
|
||||
if (typeof res === 'object' && typeof res.then === 'function') {
|
||||
const message = await onClick(updateFunc)
|
||||
const message = await res
|
||||
setLoading(false)
|
||||
setSuccessMessage(message ?? 'Success!')
|
||||
setSuccess(true)
|
||||
|
||||
Reference in New Issue
Block a user