diff --git a/src/lib/components/ETFSidecard.svelte b/src/lib/components/ETFSidecard.svelte index 6c94e96b..af9bbb6a 100644 --- a/src/lib/components/ETFSidecard.svelte +++ b/src/lib/components/ETFSidecard.svelte @@ -8,6 +8,7 @@ } from "$lib/utils"; import { goto } from "$app/navigation"; + import HoverStockChart from "$lib/components/HoverStockChart.svelte"; export let data; @@ -62,7 +63,7 @@ website = info?.website; totalAssetPercentage = topHoldingList - ?.slice(0, 5) + ?.slice(0, 10) ?.reduce((acc, current) => acc + current?.weightPercentage, 0) ?.toFixed(2); } @@ -117,31 +118,24 @@
| Sector | +|||||
|---|---|---|---|---|---|
| Sector | -Weight % | +Weight % | |||
| + | listItem?.title === item?.sector, @@ -152,7 +146,7 @@ | -+ | {abbreviateNumber(item?.weightPercentage?.toFixed(2))}% |
| Company | - -Portfolio | -
|---|
| Name | +Symbol | +Weight | |||
|---|---|---|---|---|---|
|
-
-
+
- {item?.symbol ?? "n/a"}
-
- {#if typeof item?.name !== "undefined"}
- {item?.name?.length > 20
- ? formatString(item?.name?.slice(0, 20)) + "..."
- : formatString(item?.name)?.replace(
- "Usd",
- "USD",
- )}
- {:else}
- n/a
- {/if}
-
-
- | + {#if typeof item?.name !== "undefined"} + {item?.name?.length > 20 + ? formatString(item?.name?.slice(0, 20)) + "..." + : formatString(item?.name)?.replace("Usd", "USD")} + {:else} + n/a + {/if} | -+ |
+ |
+
+ {abbreviateNumber(item?.weightPercentage?.toFixed(2))}% |
| Ex-Dividend | -Payment Date | -Amount | -
|---|
| Ex-Dividend | +Amount | +Payment Date | |||
|---|---|---|---|---|---|
| + | {new Date(item?.date)?.toLocaleString("en-US", { month: "short", day: "numeric", @@ -303,7 +273,11 @@ })} | -+ | + ${item?.adjDividend?.toFixed(4)} + | + +{item?.paymentDate?.length !== 0 ? new Date(item?.paymentDate)?.toLocaleString("en-US", { month: "short", @@ -313,10 +287,6 @@ }) : "n/a"} | - -- ${item?.adjDividend?.toFixed(2)} - |