bugfixing: redirect correctly stock page in hedge funds
This commit is contained in:
parent
341d6c0120
commit
0c95658f7f
@ -10,6 +10,8 @@
|
|||||||
let showFullText = false;
|
let showFullText = false;
|
||||||
// Function to split text into paragraphs
|
// 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) {
|
function splitIntoParagraphs(text) {
|
||||||
if (!text) return [];
|
if (!text) return [];
|
||||||
|
|
||||||
|
|||||||
@ -143,7 +143,7 @@ export function sumQuarterlyResultsByYear(quarterlyResults, namingList) {
|
|||||||
|
|
||||||
// Define a Set of keys to exclude from summing
|
// 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
|
// 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 to get the quarter number from the period string
|
||||||
function getQuarterNumber(period) {
|
function getQuarterNumber(period) {
|
||||||
|
|||||||
@ -213,7 +213,7 @@ let BottomNavigation;
|
|||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (Object?.keys($cachedPosts)?.length === 0) {
|
if (Object?.keys($cachedPosts)?.length === 0) {
|
||||||
// Only make API requests if cached posts are not available
|
// 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(),
|
getCommunityStats(),
|
||||||
getModerators(),
|
getModerators(),
|
||||||
getPost(),
|
getPost(),
|
||||||
@ -222,7 +222,6 @@ onMount(async () => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
loading = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@ -232,7 +231,6 @@ onMount(async () => {
|
|||||||
moderators = getCache('', 'getModerators');
|
moderators = getCache('', 'getModerators');
|
||||||
discordData = getCache('','getDiscordWidget');
|
discordData = getCache('','getDiscordWidget');
|
||||||
//tickerMentioning = getCache('','getTickerMentioning');
|
//tickerMentioning = getCache('','getTickerMentioning');
|
||||||
loading = false; // Mark loading as complete
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!data?.user)
|
if(!data?.user)
|
||||||
@ -242,6 +240,8 @@ onMount(async () => {
|
|||||||
|
|
||||||
BottomNavigation = (await import('$lib/components/BottomNavigation.svelte')).default;
|
BottomNavigation = (await import('$lib/components/BottomNavigation.svelte')).default;
|
||||||
|
|
||||||
|
loading = false;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -744,11 +744,11 @@ onMount(async () => {
|
|||||||
{#each displayList as item}
|
{#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">
|
<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-row items-center">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<span class="text-blue-400">{item?.symbol?.replace('_',' ')}</span>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!--{item?.firstName} {item?.lastName}-->
|
<!--{item?.firstName} {item?.lastName}-->
|
||||||
@ -849,13 +849,13 @@ onMount(async () => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{#each displayList as item,index}
|
{#each displayList as item,index}
|
||||||
<!-- row -->
|
<!-- 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-row items-center">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<span class="text-blue-400 font-medium">{item?.symbol?.replace('_',' ')}</span>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!--{item?.firstName} {item?.lastName}-->
|
<!--{item?.firstName} {item?.lastName}-->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user