update potus tracker
This commit is contained in:
parent
a0d369e3a7
commit
a501c89a83
@ -135,7 +135,7 @@
|
|||||||
<a
|
<a
|
||||||
href="/pricing"
|
href="/pricing"
|
||||||
class="no-underline sm:hover:underline text-gray-100 sm:hover:text-blue-400"
|
class="no-underline sm:hover:underline text-gray-100 sm:hover:text-blue-400"
|
||||||
>Stock Analysis Pro</a
|
>Pricing</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li class="mt-2 inline-block mr-2 md:block md:mr-0">
|
<li class="mt-2 inline-block mr-2 md:block md:mr-0">
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
let rawData = data?.getData?.history || [];
|
let rawData = data?.getData?.history || [];
|
||||||
let billData = data?.getData?.billData || [];
|
let executiveOrders = data?.getData?.executiveOrders || [];
|
||||||
|
|
||||||
const groupedByDate = rawData?.reduce((acc, item) => {
|
const groupedByDate = rawData?.reduce((acc, item) => {
|
||||||
const dateKey = new Intl.DateTimeFormat("en-US", {
|
const dateKey = new Intl.DateTimeFormat("en-US", {
|
||||||
@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
let modalTitle = "n/a";
|
let modalTitle = "n/a";
|
||||||
let modalDescription = "n/a";
|
let modalDescription = "n/a";
|
||||||
|
let modalLink = "#";
|
||||||
|
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
@ -371,18 +372,30 @@
|
|||||||
Latest Legislations
|
Latest Legislations
|
||||||
</h3>
|
</h3>
|
||||||
<div class="overflow-y-auto max-h-[1000px]">
|
<div class="overflow-y-auto max-h-[1000px]">
|
||||||
{#each billData as item}
|
{#each executiveOrders as item}
|
||||||
<div class="bg-gray-800/50 rounded-lg p-4 mb-4">
|
<div class="bg-gray-800/50 rounded-lg p-4 mb-4">
|
||||||
<!-- Badge and Time -->
|
<!-- Badge and Time -->
|
||||||
<div class="flex justify-between items-center mb-4">
|
<div class="flex justify-between items-center mb-4">
|
||||||
<span
|
<span
|
||||||
class="bg-emerald-500 text-white px-4 py-1 rounded text-sm font-medium"
|
class="{item?.sentiment === 'Bullish'
|
||||||
|
? 'bg-emerald-500'
|
||||||
|
: item?.sentiment === 'Bearish'
|
||||||
|
? 'bg-red-600'
|
||||||
|
: 'bg-yellow-600'} text-white px-4 py-1 rounded text-sm font-medium"
|
||||||
>
|
>
|
||||||
{item?.badge}
|
{item?.sentiment}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-gray-400 text-sm"
|
<span class="text-gray-400 text-sm"
|
||||||
>{item?.time !== null ? item?.time : ""}</span
|
>{#if item?.date !== null}
|
||||||
>
|
{new Date(item?.date).toLocaleDateString("en-US", {
|
||||||
|
year: "numeric",
|
||||||
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
|
})}
|
||||||
|
{:else}
|
||||||
|
""
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
@ -403,6 +416,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
modalTitle = item?.title;
|
modalTitle = item?.title;
|
||||||
modalDescription = item?.description;
|
modalDescription = item?.description;
|
||||||
|
modalLink = item?.link;
|
||||||
}}
|
}}
|
||||||
for="readMore"
|
for="readMore"
|
||||||
class="cursor-pointer bg-blue-500 sm:hover:bg-blue-600 ease-out transition duration-100 text-white px-3 py-1.5 rounded text-sm"
|
class="cursor-pointer bg-blue-500 sm:hover:bg-blue-600 ease-out transition duration-100 text-white px-3 py-1.5 rounded text-sm"
|
||||||
@ -434,14 +448,23 @@
|
|||||||
class="modal-box rounded-md border border-gray-600 w-full bg-secondary flex flex-col items-center"
|
class="modal-box rounded-md border border-gray-600 w-full bg-secondary flex flex-col items-center"
|
||||||
>
|
>
|
||||||
<div class="mx-auto h-1.5 w-20 flex-shrink-0 rounded-full" />
|
<div class="mx-auto h-1.5 w-20 flex-shrink-0 rounded-full" />
|
||||||
<div class="text-white mb-5 text-center">
|
<div class="text-white mb-5 text-start">
|
||||||
<h3 class="font-bold text-xl mb-5">{modalTitle}</h3>
|
<h3 class="font-bold text-xl mb-5">{modalTitle}</h3>
|
||||||
<span class="text-white text-[1rem] font-normal"
|
<span class="text-white text-[1rem] font-normal"
|
||||||
>{@html modalDescription}</span
|
>{@html modalDescription}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="border-t border-gray-600 mt-2 w-full">
|
<a
|
||||||
|
href={modalLink}
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
class="ml-auto mb-3 cursor-pointer bg-blue-500 sm:hover:bg-blue-600 ease-out transition duration-100 text-white px-3 py-1.5 rounded text-sm"
|
||||||
|
>
|
||||||
|
Read Source
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="sm:hidden border-t border-gray-600 mt-2 w-full">
|
||||||
<label
|
<label
|
||||||
for="readMore"
|
for="readMore"
|
||||||
class="mt-4 font-semibold text-white text-xl m-auto flex justify-center cursor-pointer"
|
class="mt-4 font-semibold text-white text-xl m-auto flex justify-center cursor-pointer"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user