|
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' |
8 | 9 | import Notify from './notify/Index.svelte'
|
9 | 10 | import { configuration } from '../configuration'
|
10 | 11 | import type { Observable } from 'rxjs'
|
|
42 | 43 | }
|
43 | 44 | }
|
44 | 45 |
|
45 |
| - const accountCenterComponent = $accountCenter$.enabled |
46 |
| - ? import('./account-center/Index.svelte').then(mod => mod.default) |
47 |
| - : Promise.resolve(null) |
48 |
| -
|
49 |
| - const notifyComponent = $notify$.enabled |
50 |
| - ? import('./notify/Index.svelte').then(mod => mod.default) |
51 |
| - : Promise.resolve(null) |
52 |
| -
|
53 | 46 | $: sharedContainer =
|
54 | 47 | $accountCenter$.enabled &&
|
55 | 48 | $notify$.enabled &&
|
|
366 | 359 | : ''} "
|
367 | 360 | >
|
368 | 361 | {#if $notify$.position.includes('bottom') && $accountCenter$.position.includes('bottom') && samePositionOrMobile}
|
369 |
| - {#await notifyComponent then Notify} |
370 |
| - {#if Notify} |
371 |
| - <svelte:component |
372 |
| - this={Notify} |
373 |
| - notifications={$notifications$} |
374 |
| - position={$notify$.position} |
375 |
| - {sharedContainer} |
376 |
| - /> |
377 |
| - {/if} |
378 |
| - {/await} |
| 362 | + <Notify |
| 363 | + notifications={$notifications$} |
| 364 | + position={$notify$.position} |
| 365 | + {sharedContainer} |
| 366 | + /> |
379 | 367 | {/if}
|
380 | 368 | <div
|
381 | 369 | style={!$accountCenter$.expanded &&
|
|
388 | 376 | ? 'margin-right: auto'
|
389 | 377 | : ''}
|
390 | 378 | >
|
391 |
| - {#await accountCenterComponent then AccountCenter} |
392 |
| - {#if AccountCenter} |
393 |
| - <svelte:component this={AccountCenter} settings={$accountCenter$} /> |
394 |
| - {/if} |
395 |
| - {/await} |
| 379 | + <AccountCenter settings={$accountCenter$} /> |
396 | 380 | </div>
|
397 | 381 | {#if $notify$.position.includes('top') && $accountCenter$.position.includes('top') && samePositionOrMobile}
|
398 |
| - {#await notifyComponent then Notify} |
399 |
| - {#if Notify} |
400 |
| - <svelte:component |
401 |
| - this={Notify} |
402 |
| - notifications={$notifications$} |
403 |
| - position={$notify$.position} |
404 |
| - {sharedContainer} |
405 |
| - /> |
406 |
| - {/if} |
407 |
| - {/await} |
| 382 | + <Notify |
| 383 | + notifications={$notifications$} |
| 384 | + position={$notify$.position} |
| 385 | + {sharedContainer} |
| 386 | + /> |
408 | 387 | {/if}
|
409 | 388 | </div>
|
410 | 389 | {/if}
|
|
431 | 410 | : ''}
|
432 | 411 | >
|
433 | 412 | {#if $accountCenter$.enabled && $wallets$.length}
|
434 |
| - {#await accountCenterComponent then AccountCenter} |
435 |
| - {#if AccountCenter} |
436 |
| - <svelte:component this={AccountCenter} settings={$accountCenter$} /> |
437 |
| - {/if} |
438 |
| - {/await} |
| 413 | + <AccountCenter settings={$accountCenter$} /> |
439 | 414 | {/if}
|
440 | 415 | </div>
|
441 | 416 | </div>
|
|
451 | 426 | ? 'padding-top:0;'
|
452 | 427 | : ''} "
|
453 | 428 | >
|
454 |
| - {#await notifyComponent then Notify} |
455 |
| - {#if Notify} |
456 |
| - <svelte:component |
457 |
| - this={Notify} |
458 |
| - notifications={$notifications$} |
459 |
| - position={$notify$.position} |
460 |
| - {sharedContainer} |
461 |
| - /> |
462 |
| - {/if} |
463 |
| - {/await} |
| 429 | + <Notify |
| 430 | + notifications={$notifications$} |
| 431 | + position={$notify$.position} |
| 432 | + {sharedContainer} |
| 433 | + /> |
464 | 434 | </div>
|
465 | 435 | {/if}
|
0 commit comments