mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 13:35:04 +02:00
UBERF-7959: Fix async issues (#6409)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -30,24 +30,26 @@
|
||||
const client = getClient()
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
async function showConfirmationDialog () {
|
||||
async function showConfirmationDialog (): Promise<void> {
|
||||
showPopup(
|
||||
MessageBox,
|
||||
{
|
||||
label: tracker.string.RemoveComponentDialogClose,
|
||||
message: tracker.string.RemoveComponentDialogCloseNote
|
||||
message: tracker.string.RemoveComponentDialogCloseNote,
|
||||
action: async () => {
|
||||
await removeComponent()
|
||||
}
|
||||
},
|
||||
'top',
|
||||
(result?: boolean) => {
|
||||
(result) => {
|
||||
if (result === true) {
|
||||
dispatch('close')
|
||||
removeComponent()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
async function removeComponent () {
|
||||
async function removeComponent (): Promise<void> {
|
||||
await client.remove(value)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user