From 46b6e47fed508a8dfc578c554b25b0ce481b3ee8 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 24 Jan 2025 14:48:20 +0100 Subject: [PATCH] ui fixes --- .../options/hottest-contracts/+page.svelte | 63 ++++--------------- .../options/hottest-contracts/+page.svelte | 63 ++++--------------- 2 files changed, 26 insertions(+), 100 deletions(-) diff --git a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte index e540c366..6fd0f5f0 100644 --- a/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte +++ b/src/routes/etf/[tickerID]/options/hottest-contracts/+page.svelte @@ -9,10 +9,11 @@ getCache, etfTicker, screenWidth, - numberOfUnreadNotification, displayCompanyName, } from "$lib/store"; + import SEO from "$lib/components/SEO.svelte"; + import TableHeader from "$lib/components/Table/TableHeader.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; import Infobox from "$lib/components/Infobox.svelte"; @@ -372,12 +373,6 @@ // Initialize result with timestamp let result = timestamp + "
"; - // Variables to store bid and ask values and their colors - let bidValue = null; - let askValue = null; - let bidColor = null; - let askColor = null; - // Sort params to ensure Vol appears last params.sort((a, b) => { if (a.seriesName === "Vol") return 1; @@ -393,12 +388,13 @@ param.color + '">'; - result += - marker + - param.seriesName + - ": " + - abbreviateNumberWithColor(param.value, false, true) + - "
"; + // Check if the series is for IV and add a '%' sign + const value = + param.seriesName === "IV" + ? `${param.value}%` + : (param.value?.toLocaleString("en-US") ?? "n/a"); + + result += marker + param.seriesName + ": " + value + "
"; }); if (rawDataPoint?.dte !== undefined) { @@ -554,43 +550,10 @@ } - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$etfTicker}) Hottest Options Chain Contract · - Stocknear - - - - - - - - - - - - - - - +
"; - // Variables to store bid and ask values and their colors - let bidValue = null; - let askValue = null; - let bidColor = null; - let askColor = null; - // Sort params to ensure Vol appears last params.sort((a, b) => { if (a.seriesName === "Vol") return 1; @@ -393,12 +388,13 @@ param.color + '">'; - result += - marker + - param.seriesName + - ": " + - abbreviateNumberWithColor(param.value, false, true) + - "
"; + // Check if the series is for IV and add a '%' sign + const value = + param.seriesName === "IV" + ? `${param.value}%` + : (param.value?.toLocaleString("en-US") ?? "n/a"); + + result += marker + param.seriesName + ": " + value + "
"; }); if (rawDataPoint?.dte !== undefined) { @@ -554,43 +550,10 @@ } - - - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} - {$displayCompanyName} ({$stockTicker}) Hottest Options Chain Contract · - Stocknear - - - - - - - - - - - - - - - +