UBERF-7959: Fix async issues (#6409)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-08-28 11:51:20 +05:00
committed by GitHub
parent c2d0aad760
commit 4cce003364
27 changed files with 338 additions and 424 deletions
@@ -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>