update component

This commit is contained in:
MuslemRahimi 2024-12-14 22:58:33 +01:00
parent b8c0ac0846
commit 43a6bde694
16 changed files with 196 additions and 140 deletions

View File

@ -607,10 +607,7 @@
</table>
</div>
<UpgradeToPro
{data}
title="Access {$displayCompanyName}'s 13 Report to see all institutional holders and track their selling and purchasing activity"
/>
<UpgradeToPro {data} />
{/if}
</main>
</section>

View File

@ -1,76 +1,154 @@
<script lang="ts">
export let data;
export let title;
export let color = "#09090B";
</script>
{#if data?.user?.tier !== "Pro"}
<div class="px-0 flex justify-center items-center">
<div
class="rounded bg-[{color}] pl-10 pr-10 text-center pb-10 pt-5 w-full h-full m-auto -mt-2 relative"
<div class="mt-4 py-6">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl text-center">
<h3
class="mt-2 text-2xl sm:text-3xl font-extrabold tracking-tight text-white"
>
<h3 class="text-white font-bold text-xl sm:text-2xl text-center">
Upgrade to Pro
Trade Smarter, Not Harder
</h3>
<p class="mt-4 text-lg text-white">
Cut through market noise with <span class="italic">actionable</span> insights
that actually help you make confident investment decisions. No more endless
research or gut-based guessing.
</p>
</div>
<div class="mx-auto mt-8 max-w-2xl lg:max-w-5xl">
<dl
class="grid grid-cols-1 gap-x-8 gap-y-10 md:grid-cols-2 lg:grid-cols-2 lg:gap-y-12"
>
<!-- Success Rate -->
<div class="relative pl-14">
<dt class="text-lg font-semibold leading-6 text-white">
<div
class="text-white text-center text-sm sm:text-[1rem] pt-5 text-center"
class="absolute left-0 top-0 flex h-10 w-10 items-center justify-center rounded-md bg-white"
>
{title}
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="h-6 w-6 text-black"
><path
stroke-linecap="round"
stroke-linejoin="round"
d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path></svg
>
</div>
Unlimited access to all data and tools
</dt>
<dd class="mt-2 text-base leading-7 text-white">
Unlimited access to all data and tools, giving you the edge over
everyone else in the market.
</dd>
</div>
<!--Start Market Cap Group-->
<h2 class="text-center text-lg text-white font-bold mb-3 mt-3">
and even more...
</h2>
<div class="pt-3 flex justify-center items-center m-auto">
<div class="grid grid-cols-1 sm:grid-cols-2 m-auto">
<!-- Column 1 -->
<div class="mb-4">
<ul
class="list-disc space-y-4 sm:space-y-1 m-auto text-center sm:text-start w-48 sm:w-full"
<!-- Average Return -->
<div class="relative pl-14">
<dt class="text-lg font-semibold leading-6 text-white">
<div
class="absolute left-0 top-0 flex h-10 w-10 items-center justify-center rounded-md bg-white"
>
<li class="mb-2 cursor-pointer">
<a href="/list/mega-cap-stocks" class="text-white text-sm"
>Unlimited access to all data and tools</a
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="h-6 w-6 text-black"
><path
stroke-linecap="round"
stroke-linejoin="round"
d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"
></path></svg
>
</li>
<li class="mb-2 cursor-pointer">
<a href="/list/large-cap-stocks" class="text-white text-sm"
>Unlimited Options Data</a
>
</li>
</ul>
</div>
Realtime Options Data
</dt>
<dd class="mt-2 text-base leading-7 text-white">
Instant access to live options data to spot opportunities and
trade with precision before the market moves.
</dd>
</div>
<!-- Column 2 -->
<div class="sm:ml-10">
<ul
class="list-disc space-y-1 text-center sm:text-start w-48 sm:w-full"
<!-- Rating Count -->
<div class="relative pl-14">
<dt class="text-lg font-semibold leading-6 text-white">
<div
class="absolute left-0 top-0 flex h-10 w-10 items-center justify-center rounded-md bg-white"
>
<li class="mb-2 cursor-pointer">
<a href="/list/small-cap-stocks" class="text-white text-sm"
>Unlimited Wall Street Analysts Ratings</a
<svg
class="w-6 h-6"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g
id="SVGRepo_tracerCarrier"
stroke-linecap="round"
stroke-linejoin="round"
></g><g id="SVGRepo_iconCarrier">
<path
d="M11.2691 4.41115C11.5006 3.89177 11.6164 3.63208 11.7776 3.55211C11.9176 3.48263 12.082 3.48263 12.222 3.55211C12.3832 3.63208 12.499 3.89177 12.7305 4.41115L14.5745 8.54808C14.643 8.70162 14.6772 8.77839 14.7302 8.83718C14.777 8.8892 14.8343 8.93081 14.8982 8.95929C14.9705 8.99149 15.0541 9.00031 15.2213 9.01795L19.7256 9.49336C20.2911 9.55304 20.5738 9.58288 20.6997 9.71147C20.809 9.82316 20.8598 9.97956 20.837 10.1342C20.8108 10.3122 20.5996 10.5025 20.1772 10.8832L16.8125 13.9154C16.6877 14.0279 16.6252 14.0842 16.5857 14.1527C16.5507 14.2134 16.5288 14.2807 16.5215 14.3503C16.5132 14.429 16.5306 14.5112 16.5655 14.6757L17.5053 19.1064C17.6233 19.6627 17.6823 19.9408 17.5989 20.1002C17.5264 20.2388 17.3934 20.3354 17.2393 20.3615C17.0619 20.3915 16.8156 20.2495 16.323 19.9654L12.3995 17.7024C12.2539 17.6184 12.1811 17.5765 12.1037 17.56C12.0352 17.5455 11.9644 17.5455 11.8959 17.56C11.8185 17.5765 11.7457 17.6184 11.6001 17.7024L7.67662 19.9654C7.18404 20.2495 6.93775 20.3915 6.76034 20.3615C6.60623 20.3354 6.47319 20.2388 6.40075 20.1002C6.31736 19.9408 6.37635 19.6627 6.49434 19.1064L7.4341 14.6757C7.46898 14.5112 7.48642 14.429 7.47814 14.3503C7.47081 14.2807 7.44894 14.2134 7.41394 14.1527C7.37439 14.0842 7.31195 14.0279 7.18708 13.9154L3.82246 10.8832C3.40005 10.5025 3.18884 10.3122 3.16258 10.1342C3.13978 9.97956 3.19059 9.82316 3.29993 9.71147C3.42581 9.58288 3.70856 9.55304 4.27406 9.49336L8.77835 9.01795C8.94553 9.00031 9.02911 8.99149 9.10139 8.95929C9.16534 8.93081 9.2226 8.8892 9.26946 8.83718C9.32241 8.77839 9.35663 8.70162 9.42508 8.54808L11.2691 4.41115Z"
stroke="#000"
stroke-width="1.3"
stroke-linecap="round"
stroke-linejoin="round"
></path>
</g></svg
>
</li>
<li class="mb-2 cursor-pointer">
<a href="/list/nano-cap-stocks" class="text-white text-sm"
>Unlimited Price Alerts</a
>
</li>
<!-- ...other list items -->
</ul>
</div>
</div>
Top Wallstreet Analyst Ratings
</dt>
<dd class="mt-2 text-base leading-7 text-white">
Follow ratings from the best analysts on Wall Street to stay
ahead.
</dd>
</div>
<!--End Market Cap Group-->
<!-- Recency -->
<div class="relative pl-14">
<dt class="text-lg font-semibold leading-6 text-white">
<div
class="absolute left-0 top-0 flex h-10 w-10 items-center justify-center rounded-md bg-white"
>
<svg
class="w-6 h-6 text-black"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
style="max-width:40px"
aria-hidden="true"
><path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
></path></svg
>
</div>
Up to 30 years financial history
</dt>
<dd class="mt-2 text-base leading-7 text-white">
We deliver premium Wall Street data with top-tier accuracy and up
to 30 years of history.
</dd>
</div>
</dl>
</div>
<div class="mt-10 text-center">
<a
href="/pricing"
class="mt-10 flex justify-center text-[1rem] items-center px-5 w-fit m-auto rounded-md btn text-black bg-[#fff] sm:hover:bg-gray-300 transition duration-150 ease-in-out group"
class="mt-10 flex justify-center text-[1rem] items-center px-5 w-fit m-auto rounded-md btn font-semibold text-black bg-[#fff] sm:hover:bg-gray-300 transition duration-150 ease-in-out group"
>
Become a Pro
Get Pro Membership
<span
class="tracking-normal group-hover:translate-x-0.5 transition-transform duration-150 ease-in-out"
>
@ -93,4 +171,5 @@
</a>
</div>
</div>
</div>
{/if}

View File

@ -338,10 +338,7 @@
</div>
{#if isLoaded}
<UpgradeToPro
{data}
title="Get stock forecasts from Wall Street's highest rated professionals"
/>
<UpgradeToPro {data} />
<div class="mt-4 py-6 xl:mt-10 border-t border-gray-200">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">

View File

@ -111,10 +111,7 @@
{hideLastRow}
/>
</div>
<UpgradeToPro
{data}
title="Get stock forecasts from Wall Street's highest rated professionals"
/>
<UpgradeToPro {data} />
<div class="mt-4 py-6 xl:mt-10 border-t border-gray-200">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl md:text-center">

View File

@ -257,10 +257,7 @@
<InfiniteLoading on:infinite={infiniteHandler} />
</div>
<UpgradeToPro
{data}
title="Get the latest lobbying spendings in realtime of US stock companies"
/>
<UpgradeToPro {data} />
</main>
<aside class="hidden lg:block relative fixed w-1/4 ml-4">

View File

@ -1123,10 +1123,7 @@
{/if}
</div>
<UpgradeToPro
{data}
title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"
/>
<UpgradeToPro {data} />
{:else}
<div class="flex justify-center items-center m-auto mt-16 mb-6">
<div

View File

@ -292,10 +292,7 @@
</tbody>
</table>
</div>
<UpgradeToPro
{data}
title="Get the latest insider trading to never miss out"
/>
<UpgradeToPro {data} />
</div>
{:else}
<div class="flex justify-center items-center h-80">

View File

@ -587,14 +587,7 @@ grid: {
<!--End Paragraph-->
{#if data?.user?.tier !== "Pro"}
<div class="mt-20">
<UpgradeToPro
{data}
title="Start investing smarter than everyone else with our platform"
/>
</div>
{/if}
<UpgradeToPro {data} />
</div>
</div>
</div>

View File

@ -1,5 +1,5 @@
export const load = async ({ locals, setHeaders }) => {
const { apiURL, apiKey } = locals;
const { apiURL, apiKey, user } = locals;
const getMarketMover = async () => {
@ -13,8 +13,9 @@ export const load = async ({ locals, setHeaders }) => {
body: JSON.stringify(postData),
});
const output = await response.json();
let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output;
};

View File

@ -1,5 +1,7 @@
<script lang="ts">
import Table from "$lib/components/Table/Table.svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
export let data;
let rawData = data?.getMarketMover;
@ -18,10 +20,14 @@
{ name: "% Change", rule: "changesPercentage" },
{ name: "Volume", rule: "volume" },
];
const hideLastRow = true;
</script>
{#if rawData?.length > 0}
<Table {data} {rawData} {excludedRules} {defaultList} />
<Table {data} {rawData} {excludedRules} {defaultList} {hideLastRow} />
<UpgradeToPro {data} />
{:else}
<div
class="w-full text-white text-start p-3 sm:p-5 mb-10 mt-3 rounded-md sm:flex sm:flex-row sm:items-center border border-gray-600 text-sm sm:text-[1rem]"

View File

@ -1,5 +1,5 @@
export const load = async ({ locals, setHeaders }) => {
const { apiURL, apiKey } = locals;
const { apiURL, apiKey, user } = locals;
const getMarketMover = async () => {
@ -13,8 +13,9 @@ export const load = async ({ locals, setHeaders }) => {
body: JSON.stringify(postData),
});
const output = await response.json();
let output = await response.json();
setHeaders({ "cache-control": "public, max-age=60*5" });
output = user?.tier !== "Pro" ? output?.slice(0, 5) : output;
return output;
};

View File

@ -1,5 +1,7 @@
<script lang="ts">
import Table from "$lib/components/Table/Table.svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
export let data;
let rawData = data?.getMarketMover;
@ -18,10 +20,14 @@
{ name: "% Change", rule: "changesPercentage" },
{ name: "Volume", rule: "volume" },
];
const hideLastRow = true;
</script>
{#if rawData?.length > 0}
<Table {data} {rawData} {excludedRules} {defaultList} />
<Table {data} {rawData} {excludedRules} {defaultList} {hideLastRow} />
<UpgradeToPro {data} />
{:else}
<div
class="w-full text-white text-start p-3 sm:p-5 mb-10 mt-3 rounded-md sm:flex sm:flex-row sm:items-center border border-gray-600 text-sm sm:text-[1rem]"

View File

@ -110,10 +110,7 @@
{specificRows}
/>
<UpgradeToPro
{data}
title="Get the latest stock trends from social media to never miss out the next hype"
/>
<UpgradeToPro {data} />
</div>
</main>

View File

@ -596,10 +596,7 @@
{/if}
{#if rawData?.length !== 0}
<UpgradeToPro
{data}
title="Get stock forecasts from Wall Street's highest rated professionals"
/>
<UpgradeToPro {data} />
{/if}
{#if data?.user?.tier !== "Pro"}
<div class="mt-4 py-6 xl:mt-10 border-t border-gray-200">

View File

@ -686,10 +686,7 @@
</label>
{/if}
<UpgradeToPro
{data}
title="Access {$displayCompanyName}'s insider transactions to track executive selling and purchasing activity"
/>
<UpgradeToPro {data} />
{/if}
{:else}
<div class="flex justify-center items-center h-80">

View File

@ -1123,10 +1123,7 @@
{/if}
</div>
<UpgradeToPro
{data}
title="Get the recent Options Flow Data from Hedge Funds and major institutional traders to never miss out"
/>
<UpgradeToPro {data} />
{:else}
<div class="flex justify-center items-center m-auto mt-16 mb-6">
<div