File tree Expand file tree Collapse file tree 1 file changed +34
-15
lines changed Expand file tree Collapse file tree 1 file changed +34
-15
lines changed Original file line number Diff line number Diff line change 46
46
? import (' ./account-center/Index.svelte' ).then (mod => mod .default )
47
47
: Promise .resolve (null )
48
48
49
+ const notifyComponent = $notify$ .enabled
50
+ ? import (' ./notify/Index.svelte' ).then (mod => mod .default )
51
+ : Promise .resolve (null )
52
+
49
53
$ : sharedContainer =
50
54
$accountCenter$ .enabled &&
51
55
$notify$ .enabled &&
362
366
: ' ' } "
363
367
>
364
368
{#if $notify$ .position .includes (' bottom' ) && $accountCenter$ .position .includes (' bottom' ) && samePositionOrMobile }
365
- <Notify
366
- notifications ={$notifications$ }
367
- position ={$notify$ .position }
368
- {sharedContainer }
369
- />
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 }
370
379
{/if }
371
380
<div
372
381
style ={! $accountCenter$ .expanded &&
386
395
{/await }
387
396
</div >
388
397
{#if $notify$ .position .includes (' top' ) && $accountCenter$ .position .includes (' top' ) && samePositionOrMobile }
389
- <Notify
390
- notifications ={$notifications$ }
391
- position ={$notify$ .position }
392
- {sharedContainer }
393
- />
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 }
394
408
{/if }
395
409
</div >
396
410
{/if }
437
451
? ' padding-top:0;'
438
452
: ' ' } "
439
453
>
440
- <Notify
441
- notifications ={$notifications$ }
442
- position ={$notify$ .position }
443
- {sharedContainer }
444
- />
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 }
445
464
</div >
446
465
{/if }
You can’t perform that action at this time.
0 commit comments