bugfixing etf page

This commit is contained in:
MuslemRahimi 2024-07-31 18:51:47 +02:00
parent d70a814fec
commit 7c83325f51
2 changed files with 9 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<script lang ='ts'>
import {stockTicker} from '$lib/store';
import {stockTicker, etfTicker} from '$lib/store';
import InfoModal from '$lib/components/InfoModal.svelte';
export let data;
@ -29,7 +29,7 @@ function latestInfoDate(inputDate) {
$: {
if ($stockTicker && typeof window !== 'undefined')
if (($stockTicker || $etfTicker) && typeof window !== 'undefined')
{
isLoaded = false;
showFullHistory = false;

View File

@ -11,8 +11,6 @@
export let data;
export let form;
$assetType = 'etf';
let output = null;
@ -61,13 +59,11 @@
//let TradingModel;
let CountrySegmentation;
let SectorSegmentation;
let WIIM;
//let ETFKeyInformation;
onMount(async() => {
WIIM = (await import('$lib/components/WIIM.svelte')).default;
CountrySegmentation = (await import('$lib/components/CountrySegmentation.svelte')).default;
SectorSegmentation = (await import('$lib/components/SectorSegmentation.svelte')).default;
})
@ -1227,11 +1223,14 @@ async function initializePrice() {
</div>
{/if}
{#if WIIM}
<div class="w-full mt-10 m-auto sm:p-6 {data?.getWhyPriceMoved?.length !== 0 ? '' : 'hidden'}">
<WIIM wiim={data?.getWhyPriceMoved} data={data}/>
<Lazy>
<div class="w-full mt-10 m-auto sm:p-6 {data?.getWhyPriceMoved?.length !== 0 ? '' : 'hidden'}">
{#await import('$lib/components/WIIM.svelte') then {default: Comp}}
<svelte:component this={Comp} data={data} />
{/await}
</div>
{/if}
</Lazy>
<Lazy>