update table component

This commit is contained in:
MuslemRahimi 2024-11-14 23:06:44 +01:00
parent 271867b5ef
commit 71c9e06ac9
3 changed files with 20 additions and 2 deletions

View File

@ -20,6 +20,8 @@
"marketCap",
]);
export let specificRows = [];
export let defaultList = [
{ name: "Market Cap", rule: "marketCap" },
{ name: "Price", rule: "price" },
@ -80,7 +82,11 @@
rule: "growthGrossProfit",
type: "percentSign",
},
{ name: "Net Income Growth", rule: "growthNetIncome", type: "percentSign" },
{
name: "Net Income Growth",
rule: "growthNetIncome",
type: "percentSign",
},
{ name: "EBITDA Growth", rule: "growthEBITDA", type: "percentSign" },
{ name: "EPS Growth", rule: "growthEPS", type: "percentSign" },
{ name: "Total Debt", rule: "totalDebt", type: "int" },
@ -126,9 +132,10 @@
rule: "institutionalOwnership",
type: "percent",
},
{ name: "Sentiment", rule: "sentiment", type: "sentiment" },
];
allRows = [...allRows, ...specificRows];
const proOnlyItems = new Set(
allRows
?.filter((item) => !excludedRules?.has(item?.rule)) // Exclude the items based on the rule

View File

@ -0,0 +1,6 @@
// +page.ts
import { redirect } from '@sveltejs/kit';
export function load() {
throw redirect(302, '/market-mover/premarket/gainers');
}

View File

@ -24,6 +24,10 @@
{ name: "Sentiment", rule: "sentiment" },
];
const specificRows = [
{ name: "Sentiment", rule: "sentiment", type: "sentiment" },
];
const hideLastRow = true;
</script>
@ -103,6 +107,7 @@
{excludedRules}
{defaultList}
{hideLastRow}
{specificRows}
/>
<UpgradeToPro