UBERF-8353: Reduce number of asyncs (#6806)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-10-05 01:19:31 +07:00
committed by GitHub
parent 90f4d02f71
commit 92bb848761
51 changed files with 569 additions and 340 deletions
@@ -14,9 +14,9 @@
-->
<script lang="ts">
import { WithLookup } from '@hcengineering/core'
import { translate } from '@hcengineering/platform'
import { Icon, themeStore } from '@hcengineering/ui'
import { GithubIntegrationRepository } from '@hcengineering/github'
import { translateCB } from '@hcengineering/platform'
import { Icon, themeStore } from '@hcengineering/ui'
import github from '../plugin'
export let value: WithLookup<GithubIntegrationRepository> | undefined
@@ -33,13 +33,9 @@
$: if (value !== undefined) {
label = value.name
} else {
translate(github.string.NoRepository, {}, $themeStore.language)
.then((r) => {
label = r
})
.catch((err) => {
console.error(err)
})
translateCB(github.string.NoRepository, {}, $themeStore.language, (r) => {
label = r
})
}
$: disabled = disabled || value === undefined
</script>