don't await in <setup>
`defineAsyncComponent` exists for exactly this purpose…
This commit is contained in:
parent
513a8e5de4
commit
385ecc30a3
5 changed files with 29 additions and 23 deletions
|
|
@ -189,10 +189,11 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
|
|||
import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
|
||||
const MkNote = (
|
||||
(defaultStore.state.noteDesign === 'misskey') ? (await import('@/components/MkNote.vue')).default :
|
||||
(defaultStore.state.noteDesign === 'sharkey') ? (await import('@/components/SkNote.vue')).default :
|
||||
null);
|
||||
const MkNote = defineAsyncComponent(() =>
|
||||
(defaultStore.state.noteDesign === 'misskey') ? import('@/components/MkNote.vue') :
|
||||
(defaultStore.state.noteDesign === 'sharkey') ? import('@/components/SkNote.vue') :
|
||||
null
|
||||
);
|
||||
|
||||
function calcAge(birthdate: string): number {
|
||||
const date = new Date(birthdate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue