refactor: put dynamic imports at the top of the file
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
WofWca 2023-02-28 14:07:19 +04:00
parent 5bf81d016f
commit ba8ab6a4bb
1 changed files with 6 additions and 3 deletions

View File

@ -42,6 +42,9 @@ import {useBaseStore} from '@/stores/base'
import {useColorScheme} from '@/composables/useColorScheme'
import {useBodyClass} from '@/composables/useBodyClass'
const importAccountDeleteService = async () => (await import('@/services/accountDelete')).default
const importSuccess = async () => (await import('@/message')).success
const baseStore = useBaseStore()
const authStore = useAuthStore()
const router = useRouter()
@ -62,11 +65,11 @@ watch(accountDeletionConfirm, async (accountDeletionConfirm) => {
return
}
const messageP = import('@/message')
const AccountDeleteService = (await import('@/services/accountDelete')).default
const successP = importSuccess()
const AccountDeleteService = await importAccountDeleteService()
const accountDeletionService = new AccountDeleteService()
await accountDeletionService.confirm(accountDeletionConfirm)
const {success} = await messageP
const success = await successP
success({message: t('user.deletion.confirmSuccess')})
authStore.refreshUserInfo()
}, { immediate: true })