File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 5
5
import Connect from ' ./connect/Index.svelte'
6
6
import SwitchChain from ' ./chain/SwitchChain.svelte'
7
7
import ActionRequired from ' ./connect/ActionRequired.svelte'
8
- import AccountCenter from ' ./account-center/Index.svelte'
9
8
import Notify from ' ./notify/Index.svelte'
10
9
import { configuration } from ' ../configuration'
11
10
import type { Observable } from ' rxjs'
43
42
}
44
43
}
45
44
45
+ const accountCenterComponent = $accountCenter$ .enabled
46
+ ? import (' ./account-center/Index.svelte' ).then (mod => mod .default )
47
+ : Promise .resolve (null )
48
+
46
49
$ : sharedContainer =
47
50
$accountCenter$ .enabled &&
48
51
$notify$ .enabled &&
376
379
? ' margin-right: auto'
377
380
: ' ' }
378
381
>
379
- <AccountCenter settings ={$accountCenter$ } />
382
+ {#await accountCenterComponent then AccountCenter }
383
+ {#if AccountCenter }
384
+ <svelte:component this ={AccountCenter } settings ={$accountCenter$ } />
385
+ {/if }
386
+ {/await }
380
387
</div >
381
388
{#if $notify$ .position .includes (' top' ) && $accountCenter$ .position .includes (' top' ) && samePositionOrMobile }
382
389
<Notify
410
417
: ' ' }
411
418
>
412
419
{#if $accountCenter$ .enabled && $wallets$ .length }
413
- <AccountCenter settings ={$accountCenter$ } />
420
+ {#await accountCenterComponent then AccountCenter }
421
+ {#if AccountCenter }
422
+ <svelte:component this ={AccountCenter } settings ={$accountCenter$ } />
423
+ {/if }
424
+ {/await }
414
425
{/if }
415
426
</div >
416
427
</div >
You can’t perform that action at this time.
0 commit comments