ui fixes
This commit is contained in:
parent
2b925732f6
commit
5c842c9f3d
@ -272,7 +272,7 @@ onMount(async () => {
|
||||
|
||||
<div class="absolute top-0 left-1/2 transform -translate-x-1/2 rounded-b-2xl flex flex-row border border-gray-300 items-center p-2">
|
||||
<span class="text-white text-md font-semibold px-3">
|
||||
Limited Offer
|
||||
2 Days Left
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -289,6 +289,7 @@ onMount(async () => {
|
||||
<div class="flex flex-row items-center">
|
||||
<span class="mr-2 text-4xl font-bold">$599</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
let highestVolumeTicker;
|
||||
let highestSizeTicker;
|
||||
let highestAmountTicker;
|
||||
let sumAmountTicker
|
||||
let displayDate;
|
||||
let scrollContainer;
|
||||
let notFound = false;
|
||||
@ -144,6 +145,17 @@ function formatTime(dateString) {
|
||||
return { ticker: maxAmountTicker, amount: maxAmount };
|
||||
}
|
||||
|
||||
function sumTotalAmount(data) {
|
||||
let totalAmount = 0;
|
||||
let ticker;
|
||||
// Iterate through the data and sum up the cost basis for each item
|
||||
data?.forEach(item => {
|
||||
totalAmount += item?.volume * item?.price;
|
||||
});
|
||||
|
||||
return{ ticker: data?.at(0)?.symbol, totalAmount: totalAmount };
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function handleScroll() {
|
||||
@ -167,6 +179,8 @@ function formatTime(dateString) {
|
||||
highestSizeTicker = findHighestSize(rawData);
|
||||
highestAmountTicker = findHighestAmount(rawData);
|
||||
|
||||
sumAmountTicker = sumTotalAmount(rawData);
|
||||
|
||||
if (data?.user?.tier === 'Pro') {
|
||||
const attachScrollListener = () => {
|
||||
if (scrollContainer) {
|
||||
@ -228,6 +242,7 @@ onDestroy(async() => {
|
||||
highestVolumeTicker = findHighestVolume(rawData);
|
||||
highestSizeTicker = findHighestSize(rawData);
|
||||
highestAmountTicker = findHighestAmount(rawData);
|
||||
sumAmountTicker = sumTotalAmount(rawData);
|
||||
|
||||
}, 200);
|
||||
}
|
||||
@ -375,7 +390,7 @@ const debouncedHandleInput = debounce(handleInput, 200);
|
||||
<!--Start Most Traded-->
|
||||
<div class="flex flex-row items-center flex-wrap w-full px-3 sm:px-5 bg-[#262626] shadow-lg rounded-lg h-20">
|
||||
<div class="flex flex-col items-start">
|
||||
<span class="font-medium text-gray-200 text-sm ">Most Traded Option</span>
|
||||
<span class="font-medium text-gray-200 text-sm ">Most Traded Symbol</span>
|
||||
<span class="text-start text-sm sm:text-[1rem] font-medium text-white mt-0.5">
|
||||
<a href={"/stocks/"+mostFrequentTicker?.ticker} class="text-blue-400 ">
|
||||
{mostFrequentTicker?.ticker}
|
||||
@ -437,6 +452,20 @@ const debouncedHandleInput = debounce(handleInput, 200);
|
||||
</div>
|
||||
</div>
|
||||
<!--End Amount-->
|
||||
|
||||
<!--Start Amount-->
|
||||
<div class="flex flex-row items-center flex-wrap w-full px-5 bg-[#262626] shadow-lg rounded-lg h-20">
|
||||
<div class="flex flex-col items-start">
|
||||
<span class="font-medium text-gray-200 text-sm ">Total Amount</span>
|
||||
<span class="text-start text-sm sm:text-[1rem] font-medium text-white mt-0.5">
|
||||
<a href={"/stocks/"+sumAmountTicker?.ticker} class="text-blue-400 ">
|
||||
{sumAmountTicker?.ticker}
|
||||
</a>
|
||||
{abbreviateNumber(sumAmountTicker?.totalAmount, true)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--End Amount-->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -80,6 +80,9 @@ onMount( async() => {
|
||||
<div class="flex flex-col w-full max-w-7xl m-auto justify-center items-center">
|
||||
<div class="text-center mb-10 w-full px-4 sm:px-3 mt-10">
|
||||
|
||||
{#if Feedback}
|
||||
<Feedback data={data} />
|
||||
{/if}
|
||||
|
||||
<div class="text-center mb-5 relative w-fit flex justify-center m-auto">
|
||||
<a href="/cramer-tracker" class="text-white antialiased bg-[#27272A] w-full px-4 py-2 rounded-xl m-auto font-medium text-sm flex items-center">
|
||||
|
||||
@ -373,7 +373,7 @@ async function purchasePlan(subscriptionType:string='') {
|
||||
|
||||
<div class="absolute top-0 left-1/2 transform -translate-x-1/2 rounded-b-2xl flex flex-row border border-gray-300 items-center p-2">
|
||||
<span class="text-white text-md font-semibold px-3">
|
||||
Limited Offer
|
||||
2 Days Left
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user