diff --git a/src/routes/etf/[tickerID]/holdings/+page.svelte b/src/routes/etf/[tickerID]/holdings/+page.svelte index 44eaef43..c4a11e94 100644 --- a/src/routes/etf/[tickerID]/holdings/+page.svelte +++ b/src/routes/etf/[tickerID]/holdings/+page.svelte @@ -1,187 +1,303 @@ - - - {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ''} {$displayCompanyName} ({$etfTicker}) Holdings List · stocknear + {$numberOfUnreadNotification > 0 ? `(${$numberOfUnreadNotification})` : ""} + {$displayCompanyName} ({$etfTicker}) Holdings List · stocknear - - + + - - - + + + - - - + + + - - - - - -
+
-
-
-
-

- ETF Holdings -

+
+
+
+

+ ETF Holdings +

+
+ -
- - - {#if rawData?.length !== 0} - The {$displayCompanyName} holds {rawData?.length} different assets - and the largest one in the portfolio is {formatString(rawData?.at(0)?.name)}, making up {rawData?.at(0)?.weightPercentage?.toFixed(2)}% of the total. - {:else} - No information available for {$displayCompanyName}. - {/if} + {#if rawData?.length !== 0} + The {$displayCompanyName} holds {rawData?.length} different assets + and the largest one in the portfolio is {formatString( + rawData?.at(0)?.name, + )}, making up {rawData?.at(0)?.weightPercentage?.toFixed(2)}% of + the total. + {:else} + No information available for {$displayCompanyName}. + {/if} +
+
-
- + {#if holdings?.length !== 0} +
+ +
- -
- - {#if holdings?.length !== 0} +
+ + + + + + {#each holdings as item} + + {#if item?.asset !== null} + + -
- - -
+ {item?.asset?.length !== 0 ? item?.asset : "-"} +
- - - - - - - - - - {#each holdings as item} - - {#if item?.asset !== null} - - - - - - - - - - - - - - - - - - - - {/if} - {/each} + - -
SymbolName changeOrder('shares')} class="text-white border-b border-[#09090B] bg-[#09090B] font-semibold text-end text-sm sm:text-[1rem] whitespace-nowrap cursor-pointer"> - Shares - - changeOrder('weights')} class="text-white border-b border-[#09090B] bg-[#09090B] font-semibold text-end text-sm sm:text-[1rem] whitespace-nowrap cursor-pointer"> - % Weight - -
- {item?.asset?.length !== 0 ? item?.asset : '-'} - - {item?.name?.length > charNumber ? formatString(item?.name?.slice(0,charNumber)) + "..." : formatString(item?.name)} - - {abbreviateNumber(item?.sharesNumber)} - - {item?.weightPercentage >= 0.01 ? item?.weightPercentage?.toFixed(2) : '< 0.01'}% -
+ {item?.name?.length > charNumber + ? formatString(item?.name?.slice(0, charNumber)) + + "..." + : formatString(item?.name)} +
- + + {abbreviateNumber(item?.sharesNumber)} + -
- - - - - {:else} -

- No holdings are available for {$displayCompanyName}. -

- - {/if} - - - -
-
-
-
\ No newline at end of file + + {item?.weightPercentage >= 0.01 + ? item?.weightPercentage?.toFixed(2) + : "< 0.01"}% + + + {/if} + {/each} + + + + {:else} +

+ No holdings are available for {$displayCompanyName}. +

+ {/if} + + + +