remove lazy load

This commit is contained in:
MuslemRahimi 2024-08-07 10:48:20 +02:00
parent 10a0d29603
commit 08ad178040
6 changed files with 12 additions and 31 deletions

View File

@ -9,7 +9,6 @@ import { GridComponent } from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
use([LineChart, GridComponent, CanvasRenderer])
import Lazy from 'svelte-lazy';
export let data;
let isLoaded = false;
@ -247,12 +246,9 @@ let charNumber = 20;
<div class="pb-2 rounded-lg bg-[#09090B]">
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</Lazy>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</div>

View File

@ -3,7 +3,6 @@ import { etfTicker, screenWidth} from '$lib/store';
import { formatString } from '$lib/utils';
import InfoModal from '$lib/components/InfoModal.svelte';
import { countryList} from '$lib/country-list.ts';
import Lazy from 'svelte-lazy';
export let geographicList;
@ -64,7 +63,6 @@ $: {
/>
</div>
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
{#if geographicList?.length !== 0}
<div class="text-white text-md mt-3">
The ETF is build on top of {geographicList?.length} regions:
@ -118,7 +116,6 @@ $: {
<svg class="w-10 sm:w-12 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#334155" d="M18.68 12.32a4.49 4.49 0 0 0-6.36.01a4.49 4.49 0 0 0 0 6.36a4.508 4.508 0 0 0 5.57.63L21 22.39L22.39 21l-3.09-3.11c1.13-1.77.87-4.09-.62-5.57m-1.41 4.95c-.98.98-2.56.97-3.54 0c-.97-.98-.97-2.56.01-3.54c.97-.97 2.55-.97 3.53 0c.97.98.97 2.56 0 3.54M10.9 20.1a6.527 6.527 0 0 1-1.48-2.32C6.27 17.25 4 15.76 4 14v3c0 2.21 3.58 4 8 4c-.4-.26-.77-.56-1.1-.9M4 9v3c0 1.68 2.07 3.12 5 3.7v-.2c0-.93.2-1.85.58-2.69C6.34 12.3 4 10.79 4 9m8-6C7.58 3 4 4.79 4 7c0 2 3 3.68 6.85 4h.05c1.2-1.26 2.86-2 4.6-2c.91 0 1.81.19 2.64.56A3.215 3.215 0 0 0 20 7c0-2.21-3.58-4-8-4Z"/></svg>
</h2>
{/if}
</Lazy>
</div>
</div>
</div>

View File

@ -10,7 +10,6 @@ import { GridComponent } from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
use([BarChart, GridComponent, CanvasRenderer])
import Lazy from 'svelte-lazy';
export let data;
let isLoaded = false;
@ -242,11 +241,9 @@ use([BarChart, GridComponent, CanvasRenderer])
<div class="pb-2 rounded-lg bg-[#09090B]">
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</Lazy>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</div>

View File

@ -3,7 +3,6 @@ import { impliedVolatilityComponent, displayCompanyName, stockTicker, assetType,
import InfoModal from '$lib/components/InfoModal.svelte';
import { Chart } from 'svelte-echarts'
import { formatDateRange } from "$lib/utils";
import Lazy from 'svelte-lazy';
import { init, use } from 'echarts/core'
import { LineChart } from 'echarts/charts'
@ -283,11 +282,9 @@ function changeStatement(event)
<div class="pb-2 rounded-lg bg-[#09090B]">
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</Lazy>
<div class="app w-full h-[300px] mt-5">
<Chart {init} options={optionsData} class="chart" />
</div>
</div>

View File

@ -1,7 +1,6 @@
<script lang='ts'>
import { Chart } from 'svelte-echarts'
import Lazy from "svelte-lazy";
import { init, use } from 'echarts/core'
import { BarChart } from 'echarts/charts'
@ -295,11 +294,9 @@ use([BarChart, GridComponent, CanvasRenderer])
</div>
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
<div class="app w-full h-[300px] mt-5 mb-16">
<Chart {init} options={optionsAnnualReturn} class="chart" />
</div>
</Lazy>
<div class="app w-full h-[300px] mt-5 mb-16">
<Chart {init} options={optionsAnnualReturn} class="chart" />
</div>
{:else if displayReturn === 'monthlyDistributionReturn'}

View File

@ -4,7 +4,6 @@ import {etfTicker, screenWidth} from '$lib/store';
import { formatString } from '$lib/utils';
import { goto } from '$app/navigation';
import InfoModal from '$lib/components/InfoModal.svelte'
import Lazy from 'svelte-lazy';
export let sectorList;
@ -102,7 +101,6 @@ $: {
id={"sectorWeightingInfo"}
/>
</div>
<Lazy height={300} fadeOption={{delay: 100, duration: 500}} keep={true}>
{#if sectorList?.length !== 0}
<div class="text-white text-md mt-3">
@ -152,7 +150,6 @@ $: {
<svg class="w-10 sm:w-12 inline-block" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#334155" d="M18.68 12.32a4.49 4.49 0 0 0-6.36.01a4.49 4.49 0 0 0 0 6.36a4.508 4.508 0 0 0 5.57.63L21 22.39L22.39 21l-3.09-3.11c1.13-1.77.87-4.09-.62-5.57m-1.41 4.95c-.98.98-2.56.97-3.54 0c-.97-.98-.97-2.56.01-3.54c.97-.97 2.55-.97 3.53 0c.97.98.97 2.56 0 3.54M10.9 20.1a6.527 6.527 0 0 1-1.48-2.32C6.27 17.25 4 15.76 4 14v3c0 2.21 3.58 4 8 4c-.4-.26-.77-.56-1.1-.9M4 9v3c0 1.68 2.07 3.12 5 3.7v-.2c0-.93.2-1.85.58-2.69C6.34 12.3 4 10.79 4 9m8-6C7.58 3 4 4.79 4 7c0 2 3 3.68 6.85 4h.05c1.2-1.26 2.86-2 4.6-2c.91 0 1.81.19 2.64.56A3.215 3.215 0 0 0 20 7c0-2.21-3.58-4-8-4Z"/></svg>
</h2>
{/if}
</Lazy>
</div>
</div>