From 0cc0add50d0b4c8f44c986752a68b7b526c5dc77 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 28 Aug 2024 13:48:07 +0200 Subject: [PATCH] update etf info card --- src/lib/components/DividendCard.svelte | 1 - src/lib/components/ETFKeyInformation.svelte | 2 +- src/lib/components/ETFProfileCard.svelte | 68 +++++++++++---------- src/routes/etf/[tickerID]/+layout.svelte | 1 + 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/lib/components/DividendCard.svelte b/src/lib/components/DividendCard.svelte index 931d8695..2ad5ef91 100644 --- a/src/lib/components/DividendCard.svelte +++ b/src/lib/components/DividendCard.svelte @@ -14,7 +14,6 @@ dividendHistoryList = dividendList?.history; dividendYield = dividendList?.dividendYield; - console.log(dividendList) } } diff --git a/src/lib/components/ETFKeyInformation.svelte b/src/lib/components/ETFKeyInformation.svelte index e06711a0..7f181a11 100644 --- a/src/lib/components/ETFKeyInformation.svelte +++ b/src/lib/components/ETFKeyInformation.svelte @@ -72,7 +72,7 @@
- +
diff --git a/src/lib/components/ETFProfileCard.svelte b/src/lib/components/ETFProfileCard.svelte index 96eccefa..1341dc82 100644 --- a/src/lib/components/ETFProfileCard.svelte +++ b/src/lib/components/ETFProfileCard.svelte @@ -6,27 +6,21 @@ import { goto } from '$app/navigation'; import defaultImage from '$lib/images/etf/cover/default.jpg'; - export let logoUrl; export let etfProfile; - + export let data; let info; - let imageUrl; - - let tierList = 'S'; let assetClass = '-'; let aum = '-'; let avgVolume = '-'; let inceptionDate = '-'; let holdingsCount = '-'; - let exchange = '-'; let provider = '-'; let sectorExposed; let country; let description = ''; let website = '-'; let snippet; - let showFullText = false; @@ -92,35 +86,45 @@ let showFullText = false;

ETF Info

- +
- - - - - - + + + + + + + - - - - - - + + + + + - - - - - - + + + + + - - - - - - + + + + + + + + + + + + + + + + +
Name{$displayCompanyName?.length > 30 ? $displayCompanyName?.slice(0,30) + '...' : $displayCompanyName}Ticker{$etfTicker}
Provider goto(`/etf/etf-providers/${provider}`)} class="text-center sm:text-end text-blue-400 lg:hover:text-white cursor-pointer bg-[#000] lg:bg-[#09090B]">{formatETFName(provider)}Country{country?.length !== 0 ? country : '-'}
Provider goto(`/etf/etf-providers/${provider}`)} class="text-blue-400 lg:border-b lg:border-[#27272A] lg:hover:text-white cursor-pointer bg-[#000] lg:bg-[#09090B]">{formatETFName(provider)}Country{country?.length !== 0 ? country : '-'}
AUM{abbreviateNumber(aum,true)}Vol{abbreviateNumber(data?.getStockQuote?.volume)}
Value{abbreviateNumber(aum,true)}Volume{abbreviateNumber(avgVolume)}
Shares Out.{abbreviateNumber(data?.getStockQuote?.sharesOutstanding)}Avg. Vol{abbreviateNumber(avgVolume)}
Holdings{holdingsCount} AssetsInception{inceptionDate}
Open{data?.getStockQuote?.open?.toFixed(2)}Prev. Close{data?.getStockQuote?.previousClose?.toFixed(2)}
EPS (ttm){data?.getStockQuote?.eps?.toFixed(2)}PE Ratio (ttm){data?.getStockQuote?.pe?.toFixed(2)}
Holdings{holdingsCount} AssetsInception{inceptionDate}
diff --git a/src/routes/etf/[tickerID]/+layout.svelte b/src/routes/etf/[tickerID]/+layout.svelte index 800eb6e1..b90a4530 100644 --- a/src/routes/etf/[tickerID]/+layout.svelte +++ b/src/routes/etf/[tickerID]/+layout.svelte @@ -763,6 +763,7 @@ $: {