From d8852f33d11ff489d7d9a432f80c92b09b6e624b Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 20 Feb 2025 23:37:31 +0100 Subject: [PATCH] ui fix --- src/lib/utils.ts | 5 ++++ .../statistics/revenue/+page.svelte | 26 +++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index a3c449ef..1a938566 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -18,6 +18,11 @@ type FlyAndScaleParams = { duration?: number; }; +export function removeCompanyStrings(name) { + const wordsToRemove = ["Technologies", "Inc."]; +if (!name) return ""; + return wordsToRemove?.reduce((acc, word) => acc.replace(word, "").trim(), name); +} export function convertToSlug(title) { // Remove punctuation, hyphens, and special characters diff --git a/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte b/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte index cdedb6f5..38f1532b 100644 --- a/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte +++ b/src/routes/stocks/[tickerID]/statistics/revenue/+page.svelte @@ -1,6 +1,10 @@
@@ -182,13 +196,15 @@
-

Market Cap

+

+ {removeCompanyStrings($displayCompanyName)} Revenue +

{#if rawData?.length !== 0}