From 2a34847fa15331e701a1e4d5b1817238120efdf0 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Mon, 2 Dec 2024 20:32:23 +0100 Subject: [PATCH] ui fixes --- src/lib/components/ETFSidecard.svelte | 9 +++-- src/lib/components/News.svelte | 38 +------------------ src/lib/components/TopHoldingCard.svelte | 4 +- src/lib/utils.ts | 13 +++++-- .../etf/[tickerID]/insider/+layout.svelte | 30 +-------------- 5 files changed, 22 insertions(+), 72 deletions(-) diff --git a/src/lib/components/ETFSidecard.svelte b/src/lib/components/ETFSidecard.svelte index 79b7a019..6f89f39f 100644 --- a/src/lib/components/ETFSidecard.svelte +++ b/src/lib/components/ETFSidecard.svelte @@ -23,11 +23,11 @@ let dividendYield; async function stockSelector(ticker: string) { - if (ticker?.length !== 0 && !["BTC", "USD"]?.includes(ticker)) { + if (ticker?.length !== 0 && !["BTCUSD", "USD"]?.includes(ticker)) { window?.scroll({ top: 0, left: 0, behavior: "smooth" }); stockTicker.update((value) => ticker); goto("/stocks/" + ticker + "/"); - } else if (ticker === "BTC") { + } else if (ticker === "BTCUSD") { window?.scroll({ top: 0, left: 0, behavior: "smooth" }); cryptoTicker.update((value) => "BTCUSD"); goto("/crypto/BTCUSD"); @@ -189,7 +189,10 @@ {#if typeof item?.name !== "undefined"} {item?.name?.length > 20 ? formatString(item?.name?.slice(0, 20)) + "..." - : formatString(item?.name)} + : formatString(item?.name)?.replace( + "Usd", + "USD", + )} {:else} n/a {/if} diff --git a/src/lib/components/News.svelte b/src/lib/components/News.svelte index feee0769..2af16406 100644 --- a/src/lib/components/News.svelte +++ b/src/lib/components/News.svelte @@ -1,46 +1,12 @@
@@ -77,7 +51,7 @@