bugfixing: redirect correctly stock page in hedge funds
This commit is contained in:
parent
341d6c0120
commit
0c95658f7f
@ -10,6 +10,8 @@
|
||||
let showFullText = false;
|
||||
// Function to split text into paragraphs
|
||||
|
||||
//DO NOT TOUCH THIS CODE - SAFARI 15.3 are not compatible with the previous code. The website will break.
|
||||
// CONSIDER MOVING THIS LOGIC TO THE BACKEND TO REMOVE THE RISK COMPLETELY
|
||||
function splitIntoParagraphs(text) {
|
||||
if (!text) return [];
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ export function sumQuarterlyResultsByYear(quarterlyResults, namingList) {
|
||||
|
||||
// Define a Set of keys to exclude from summing
|
||||
// FMP sucks since these keys are up to date for every quarter hence no summation required
|
||||
const excludeKeys = new Set(['priceToEarnings', 'weightedAverageShsOut', 'weightedAverageShsOutDil']);
|
||||
const excludeKeys = new Set(['totalDebt','priceToEarnings', 'weightedAverageShsOut', 'weightedAverageShsOutDil']);
|
||||
|
||||
// Function to get the quarter number from the period string
|
||||
function getQuarterNumber(period) {
|
||||
|
||||
@ -213,7 +213,7 @@ let BottomNavigation;
|
||||
onMount(async () => {
|
||||
if (Object?.keys($cachedPosts)?.length === 0) {
|
||||
// Only make API requests if cached posts are not available
|
||||
[communityStats, moderators, posts, discordData] = await Promise?.all([
|
||||
[communityStats, moderators, posts, discordData] = await Promise.all([
|
||||
getCommunityStats(),
|
||||
getModerators(),
|
||||
getPost(),
|
||||
@ -222,7 +222,6 @@ onMount(async () => {
|
||||
]);
|
||||
|
||||
window.scrollTo(0, 0);
|
||||
loading = false;
|
||||
}
|
||||
|
||||
else {
|
||||
@ -232,7 +231,6 @@ onMount(async () => {
|
||||
moderators = getCache('', 'getModerators');
|
||||
discordData = getCache('','getDiscordWidget');
|
||||
//tickerMentioning = getCache('','getTickerMentioning');
|
||||
loading = false; // Mark loading as complete
|
||||
}
|
||||
|
||||
if(!data?.user)
|
||||
@ -242,6 +240,8 @@ onMount(async () => {
|
||||
|
||||
BottomNavigation = (await import('$lib/components/BottomNavigation.svelte')).default;
|
||||
|
||||
loading = false;
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -744,11 +744,11 @@ onMount(async () => {
|
||||
{#each displayList as item}
|
||||
<tr on:click={() => goto(`/${item?.type}/${item?.symbol}`)} class="sm:hover:bg-[#245073] sm:hover:bg-opacity-[0.2] odd:bg-[#27272A] border-b-[#27272A] cursor-pointer">
|
||||
|
||||
<td class="text-gray-200 pb-3 border-b border-b-[#27272A] whitespace-nowrap">
|
||||
<td class="pb-3 border-b border-b-[#27272A] whitespace-nowrap">
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-blue-400">{item?.symbol?.replace('_',' ')}</span>
|
||||
<span class="text-white text-sm">{formatString(item?.securityName)}</span>
|
||||
<span class="text-white">{formatString(item?.securityName)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--{item?.firstName} {item?.lastName}-->
|
||||
@ -849,13 +849,13 @@ onMount(async () => {
|
||||
<tbody>
|
||||
{#each displayList as item,index}
|
||||
<!-- row -->
|
||||
<tr on:click={() => goto(`/${item?.type}/${item?.ticker}`)} class="odd:bg-[#27272A] cursor-pointer">
|
||||
<tr on:click={() => goto(`/${item?.type}/${item?.symbol}`)} class="odd:bg-[#27272A] cursor-pointer">
|
||||
|
||||
<td class="text-gray-200 border-b border-b-[#09090B] whitespace-nowrap">
|
||||
<td class="text-white border-b border-b-[#09090B] whitespace-nowrap">
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-blue-400 font-medium">{item?.symbol?.replace('_',' ')}</span>
|
||||
<span class="text-white text-xs">{item?.securityName?.length > charNumber ? formatString(item?.securityName?.slice(0,charNumber)) + '...' : formatString(item?.securityName)}</span>
|
||||
<span class="">{item?.securityName?.length > charNumber ? formatString(item?.securityName?.slice(0,charNumber)) + '...' : formatString(item?.securityName)}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--{item?.firstName} {item?.lastName}-->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user