ui fixes
This commit is contained in:
parent
922b9d020b
commit
7a34ce0867
@ -382,7 +382,7 @@ export function addDays(data, days, state) {
|
||||
return result;
|
||||
} else {
|
||||
const differenceInTime = result - createdDate;
|
||||
const differenceInDays = differenceInTime / (1000 * 60 * 60 * 24);
|
||||
const differenceInDays = Math.round(differenceInTime / (1000 * 60 * 60 * 24));
|
||||
return Math.abs(differenceInDays);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import "../app.pcss";
|
||||
|
||||
import { Toaster } from 'svelte-french-toast';
|
||||
import {getImageURL, addDays} from '$lib/utils';
|
||||
import {getImageURL } from '$lib/utils';
|
||||
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
@ -47,7 +47,8 @@
|
||||
let cloudFrontUrl = import.meta.env.VITE_IMAGE_URL;
|
||||
|
||||
|
||||
const trialLeftDays = Math?.floor(addDays(data, 7, ''));
|
||||
//const trialLeftDays = Math?.floor(addDays(data, 7, ''));
|
||||
|
||||
|
||||
async function pushNotification() {
|
||||
Notification?.requestPermission()?.then(perm => {
|
||||
@ -630,9 +631,8 @@ $: {
|
||||
<Card.Title>Upgrade to Pro</Card.Title>
|
||||
<Card.Description>
|
||||
{#if data?.user?.freeTrial === true}
|
||||
You have only
|
||||
<span class="font-bold text-[#FBCE3C]">{trialLeftDays} days</span>
|
||||
left on your free trial. Upgrade now for unlimited access to all features!
|
||||
Your free trial will be expired soon.
|
||||
Upgrade now for unlimited access to all features!
|
||||
{:else}
|
||||
Unlock all features of the platform and level up your trading.
|
||||
{/if}
|
||||
@ -930,9 +930,8 @@ $: {
|
||||
<Card.Title>Upgrade to Pro</Card.Title>
|
||||
<Card.Description>
|
||||
{#if data?.user?.freeTrial === true}
|
||||
You have only
|
||||
<span class="font-bold text-[#FBCE3C]">{trialLeftDays} days</span>
|
||||
left on your free trial. Upgrade now for unlimited access to all features!
|
||||
Your free trial will expire soon.
|
||||
Upgrade now for unlimited access to all features!
|
||||
{:else}
|
||||
Unlock all features of the platform and level up your trading.
|
||||
{/if}
|
||||
|
||||
@ -197,7 +197,7 @@ async function loadSearchData() {
|
||||
<!-- Start Column -->
|
||||
<div >
|
||||
|
||||
|
||||
<!--
|
||||
{#if (data?.user?.tier === 'Pro' && data?.user?.freeTrial === true) || (data?.user?.tier !== 'Pro' && data?.user?.freeTrial === false) }
|
||||
<div class="text-center mb-5 relative w-fit flex justify-center m-auto">
|
||||
<a href="/pricing" class="text-white antialiased bg-[#27272A] w-full px-4 py-2 rounded-xl m-auto font-medium text-sm flex items-center">
|
||||
@ -223,6 +223,7 @@ async function loadSearchData() {
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user