diff --git a/src/lib/components/BullBearSay.svelte b/src/lib/components/BullBearSay.svelte index 0cabba22..89ccdcbd 100644 --- a/src/lib/components/BullBearSay.svelte +++ b/src/lib/components/BullBearSay.svelte @@ -52,7 +52,7 @@
-
+
@@ -73,42 +73,36 @@
- {#each tabs as item, i} -
+ {/if} + - - - {/each} + {item.title} + + + {/each} +
- +
diff --git a/src/lib/components/WIIM.svelte b/src/lib/components/WIIM.svelte index e4b810d1..095a4500 100644 --- a/src/lib/components/WIIM.svelte +++ b/src/lib/components/WIIM.svelte @@ -2,6 +2,7 @@ import { stockTicker, etfTicker } from "$lib/store"; import InfoModal from "$lib/components/InfoModal.svelte"; import { get } from "svelte/store"; + import { formatDate } from "$lib/utils"; export let data; @@ -11,7 +12,7 @@ function latestInfoDate(inputDate) { // Convert the input date string to milliseconds since epoch - const inputDateMs = Date.parse(inputDate); + const inputDateMs = new Date(inputDate); // Get today's date in milliseconds since epoch const todayMs = Date.now(); @@ -54,7 +55,7 @@ {#if isLoaded} {#if wiim?.length !== 0} -
+
{#each showFullHistory ? wiim : wiim?.slice(0, 2) as item, index}
- -
+ +
0} + class:!bg-[#FF2F1F]={item?.changesPercentage < 0} + class:!bg-white={!item?.changesPercentage && + item?.changesPercentage !== 0} + >
+
- Updated {item?.date}{formatDate(item?.date)} · + + Source + {#if latestInfoDate(item?.date)}