diff --git a/src/lib/components/DarkPool.svelte b/src/lib/components/DarkPool.svelte index 84bbbfb4..977b719e 100644 --- a/src/lib/components/DarkPool.svelte +++ b/src/lib/components/DarkPool.svelte @@ -208,7 +208,7 @@ $: { -
+
diff --git a/src/lib/components/Enterprise.svelte b/src/lib/components/Enterprise.svelte index 30643de2..21b3671a 100644 --- a/src/lib/components/Enterprise.svelte +++ b/src/lib/components/Enterprise.svelte @@ -71,8 +71,9 @@ function getPlotOptions() { animation: $screenWidth < 640 ? false: true, grid: { left: $screenWidth < 640 ? '0%' : '2%', - right: $screenWidth < 640 ? '5%' : '2%', + right: $screenWidth < 640 ? '2%' : '2%', bottom: $screenWidth < 640 ? '0%' : '2%', + top: '5%', containLabel: true }, xAxis: { @@ -195,7 +196,7 @@ $: { {#if data?.user?.tier === 'Pro'} {#if isLoaded} {#if rawData?.length !== 0} -
+
@@ -208,7 +209,7 @@ $: { -
+
diff --git a/src/lib/components/RetailVolume.svelte b/src/lib/components/RetailVolume.svelte index 82e21c30..fcca9d26 100644 --- a/src/lib/components/RetailVolume.svelte +++ b/src/lib/components/RetailVolume.svelte @@ -72,9 +72,10 @@ function getPlotOptions() { silent: true, animation: $screenWidth < 640 ? false: true, grid: { - left: '2%', - right: '2%', + left: '0%', + right: '0%', bottom: '0%', + top: '5%', containLabel: true }, xAxis: { @@ -234,7 +235,7 @@ $: {
- In the past six months, the {$displayCompanyName} had an average retail investor volume of {abbreviateNumber(avgVolume,true)}, with a prevailing + In the past six months, the {$displayCompanyName} had an average retail investor volume of {avgVolume > 100e3 ? abbreviateNumber(avgVolume,true) : '< $100K'}, with a prevailing {#if avgSentiment === 'Bullish' } @@ -259,7 +260,7 @@ $: { -
+
@@ -271,7 +272,7 @@ $: { Latest Information - On {new Date(rawData?.lastDate)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}, retail traders accounted for {rawData?.retailStrength}% of the trading volume. + On {new Date(rawData?.lastDate)?.toLocaleString('en-US', { month: 'short', day: 'numeric', year: 'numeric', daySuffix: '2-digit' })}, retail traders accounted for {rawData?.retailStrength > 0.01 ? rawData?.retailStrength : '< 0.01'}% of the trading volume.
@@ -289,7 +290,7 @@ $: { Volume diff --git a/src/lib/components/RevenueSegmentation.svelte b/src/lib/components/RevenueSegmentation.svelte index f081af0d..609d1137 100644 --- a/src/lib/components/RevenueSegmentation.svelte +++ b/src/lib/components/RevenueSegmentation.svelte @@ -235,7 +235,7 @@ $: { {#if isLoaded} {#if Object?.keys(data)?.length !== 0 && totalProductRevenue !== 0} -
+
Based on the latest earnings report the main contributors of revenue are: diff --git a/src/lib/components/ShareStatistics.svelte b/src/lib/components/ShareStatistics.svelte index 619f2cb4..a8201279 100644 --- a/src/lib/components/ShareStatistics.svelte +++ b/src/lib/components/ShareStatistics.svelte @@ -64,9 +64,10 @@ function getPlotOptions() { silent: true, animation: $screenWidth < 640 ? false: true, grid: { - left: $screenWidth < 640 ? '0%' : '2%', - right: $screenWidth < 640 ? '5%' : '2%', + left: $screenWidth < 640 ? '1%' : '2%', + right: $screenWidth < 640 ? '0%' : '2%', bottom: $screenWidth < 640 ? '0%' : '2%', + top: '5%', containLabel: true }, xAxis: { @@ -175,7 +176,7 @@ $: { {#if isLoaded} {#if Object?.keys(rawData)?.length !== 0} -
+
@@ -185,7 +186,7 @@ $: { -
+
diff --git a/src/routes/community/profile/+page.svelte b/src/routes/community/profile/+page.svelte index 53a1ef8e..10367d76 100644 --- a/src/routes/community/profile/+page.svelte +++ b/src/routes/community/profile/+page.svelte @@ -7,7 +7,7 @@ import { onMount, onDestroy } from 'svelte'; import {getImageURL } from '$lib/utils'; - import {screenWidth, userRegion, setCache, getCache, newAvatar, clientSideCache, numberOfUnreadNotification, postIdDeleted } from '$lib/store'; + import {userRegion, setCache, getCache, newAvatar, numberOfUnreadNotification, postIdDeleted } from '$lib/store'; import toast from 'svelte-french-toast'; import InfiniteLoading from '$lib/components/InfiniteLoading.svelte'; @@ -499,6 +499,18 @@ const changeTab = (state) => { } }; +// Function to add days to a given date +function addDays(days) { + // Original date from the data object + const createdDate = new Date(data?.user?.created); + + const result = new Date(createdDate); + result.setDate(result.getDate() + days); + return result; +} + + +const trialEndDate = addDays(7); onMount(async () => { @@ -548,7 +560,6 @@ onDestroy(async () => { - @@ -556,7 +567,6 @@ onDestroy(async () => { - @@ -887,12 +897,16 @@ onDestroy(async () => {
- - + + + {#if data?.user?.freeTrial === true} + Active + {:else} {subscriptionData?.status_formatted ?? 'Inactive'} + {/if}
@@ -905,6 +919,8 @@ onDestroy(async () => { Your trial will end on {new Date(subscriptionData?.trial_ends_at)?.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })}. + {:else if data?.user?.freeTrial === true} + Your trial will end on {trialEndDate?.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })}. {:else if subscriptionData?.status_formatted === 'Cancelled'} Your subscription will remain active until {new Date(subscriptionData?.ends_at)?.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' })} @@ -917,7 +933,7 @@ onDestroy(async () => { Current Plan: - {['Active', 'Paid', 'On Trial', 'Cancelled']?.includes(subscriptionData?.status_formatted) ? subscriptionData?.product_name : 'Free Subscription'} + {['Active', 'Paid', 'On Trial', 'Cancelled']?.includes(subscriptionData?.status_formatted) ? subscriptionData?.product_name : data?.user?.freeTrial === true ? 'Free Trial Subscription' : 'Free Subscription'} {subscriptionData?.product_name?.includes('Monthly') ? '$9.99 billed every month' : '$90 billed every year'} @@ -945,6 +961,7 @@ onDestroy(async () => { Please wait a moment; you will be updated to Pro in a second. + {:else if data?.user?.freeTrial} {:else} Get Full Access with Pro Subscription.
- {abbreviateNumber(rawData?.lastTrade,true)} + {rawData?.lastTrade > 100e3 ? abbreviateNumber(rawData?.lastTrade,true) : '< $100K'}