diff --git a/src/lib/components/TARating.svelte b/src/lib/components/TARating.svelte index b7e07c01..8719ff99 100644 --- a/src/lib/components/TARating.svelte +++ b/src/lib/components/TARating.svelte @@ -87,7 +87,6 @@ async function updateData() { }); isLoaded = true; - console.log(signalList); } catch (error) { console.error("Error fetching data:", error); } diff --git a/src/lib/components/WIIM.svelte b/src/lib/components/WIIM.svelte index 7bbb6360..2a4a4393 100644 --- a/src/lib/components/WIIM.svelte +++ b/src/lib/components/WIIM.svelte @@ -3,9 +3,10 @@ import {stockTicker} from '$lib/store'; import InfoModal from '$lib/components/InfoModal.svelte'; - export let wiim = []; export let data; + let isLoaded = false; + let wiim; let showFullHistory = false; function latestInfoDate(inputDate) { @@ -28,9 +29,12 @@ function latestInfoDate(inputDate) { $: { - if ($stockTicker && typeof window !== 'undefined' && typeof wiim !== 'undefined' && wiim?.length !== 0) - { - showFullHistory = false; + if ($stockTicker && typeof window !== 'undefined') + { + isLoaded = false; + showFullHistory = false; + wiim = data?.getWhyPriceMoved || []; + isLoaded = true; } } @@ -55,6 +59,7 @@ $: { {#if data?.user?.tier === 'Pro'} + {#if isLoaded} {#if wiim?.length !== 0}
{#each (showFullHistory ? wiim : wiim?.slice(0,2)) as item, index} @@ -129,6 +134,16 @@ $: { {/if} + {:else} +
+
+ +
+
+ {/if} + {:else}
diff --git a/src/routes/stocks/[tickerID]/+page.svelte b/src/routes/stocks/[tickerID]/+page.svelte index 3b3349b0..b6023506 100644 --- a/src/routes/stocks/[tickerID]/+page.svelte +++ b/src/routes/stocks/[tickerID]/+page.svelte @@ -3,7 +3,7 @@ import {AreaSeries, Chart, PriceLine, CandlestickSeries} from 'svelte-lightweight-charts'; import { TrackingModeExitMode } from 'lightweight-charts'; - import {getCache, setCache, correlationComponent, dcfComponent, taRatingComponent, swapComponent, analystInsightComponent, governmentContractComponent, optionsNetFlowComponent, impliedVolatilityComponent, borrowedShareComponent, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, currentPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; + import {getCache, setCache, taRatingComponent, swapComponent, analystInsightComponent, governmentContractComponent, optionsNetFlowComponent, impliedVolatilityComponent, borrowedShareComponent, clinicalTrialComponent, optionComponent, failToDeliverComponent, marketMakerComponent, analystEstimateComponent, sentimentComponent, screenWidth, displayCompanyName, numberOfUnreadNotification, globalForm, varComponent, shareStatisticsComponent, enterpriseComponent, darkPoolComponent, retailVolumeComponent, shareholderComponent, trendAnalysisComponent, revenueSegmentationComponent, priceAnalysisComponent, fundamentalAnalysisComponent, isCrosshairMoveActive, realtimePrice, priceIncrease, currentPortfolioPrice, stockTicker, isOpen, isBeforeMarketOpen, isWeekend} from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import BullBearSay from '$lib/components/BullBearSay.svelte'; import CommunitySentiment from '$lib/components/CommunitySentiment.svelte'; @@ -31,21 +31,7 @@ } } - - - - - - let StockSplits; - let WIIM; - - - onMount(async() => { - WIIM = (await import('$lib/components/WIIM.svelte')).default; - }) - - //const startTimeTracking = performance.now(); @@ -1200,11 +1186,13 @@ function changeChartType() {
- {#if WIIM} -
- + +
+ {#await import('$lib/components/WIIM.svelte') then {default: Comp}} + + {/await}
- {/if} +