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}