diff --git a/src/routes/home/+page.svelte b/src/routes/home/+page.svelte
index bbba1462..ce0f2fb8 100644
--- a/src/routes/home/+page.svelte
+++ b/src/routes/home/+page.svelte
@@ -10,8 +10,9 @@
import Crown from "lucide-svelte/icons/crown";
import Activity from "lucide-svelte/icons/activity";
import { abbreviateNumber, formatDate } from '$lib/utils';
-
- import { numberOfUnreadNotification} from '$lib/store';
+ import * as Tabs from "$lib/components/shadcn/tabs/index.js";
+
+ import { screenWidth, numberOfUnreadNotification} from '$lib/store';
/*
import { Chart } from 'svelte-echarts'
@@ -28,6 +29,7 @@
export let data;
let isLoaded = false;
const quickInfo = data?.getDashboard?.quickInfo;
+ let optionsMode = 'premium';
function compareTimes(time1, time2) {
@@ -156,8 +158,18 @@ function latestInfoDate(inputDate) {
return differenceInDays <=1;
}
+let optionsTable = data?.getDashboard?.optionsFlow?.premium || [];
-
+function changeTable(state) {
+ optionsMode = state;
+ if (optionsMode === 'premium') {
+ optionsTable = data?.getDashboard?.optionsFlow?.premium || [];
+ } else if (optionsMode === 'volume') {
+ optionsTable = data?.getDashboard?.optionsFlow?.volume || [];
+ } else {
+ optionsTable = data?.getDashboard?.optionsFlow?.openInterest || [];
+ }
+}
let Feedback;
onMount( async() => {
@@ -325,37 +337,44 @@ onMount( async() => {
- Recent hedge fund options with the highest premiums.
+ Recent hedge fund options with the highest ...
+
+
+ changeTable('premium')} value="premium" class="text-sm">Premium
+ changeTable('volume')} value="volume" class="text-sm">Volume
+ changeTable('openInterest')} value="openInterest" class="text-sm">{$screenWidth < 640 ? 'OI' : 'Open Interest'}
+
+
- Symbol
- Prem.
- Strike
- Sent.
- C/P
- Expiry
+ Symbol
+ Prem
+ Strike
+ {optionsMode === 'openInterest' ? 'OI' : 'Vol'}
+ C/P
+ Expiry
- {#each data?.getDashboard?.optionsFlow as item}
+ {#each optionsTable as item}
{item?.ticker}
-
+
{abbreviateNumber(item?.cost_basis,true)}
-
+
${item?.strike_price}
-
- {item?.sentiment}
+
+ {abbreviateNumber(optionsMode === 'openInterest' ? item?.open_interest : item?.volume)}
-
+
{item?.put_call}
@@ -367,7 +386,7 @@ onMount( async() => {
-
+