add realtime options flow back
This commit is contained in:
parent
677359ad80
commit
7e8400564c
@ -344,6 +344,12 @@ let rawData = data?.getOptionsFlowFeed?.filter(item =>
|
|||||||
{
|
{
|
||||||
if ($isOpen) {
|
if ($isOpen) {
|
||||||
mode = !mode;
|
mode = !mode;
|
||||||
|
if(mode === true && selectedDate !== undefined) {
|
||||||
|
selectedDate = undefined;
|
||||||
|
rawData = data?.getOptionsFlowFeed
|
||||||
|
displayedData = [...rawData];
|
||||||
|
shouldLoadWorker.set(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
toast.error(`Market is closed`, {
|
toast.error(`Market is closed`, {
|
||||||
@ -422,7 +428,10 @@ async function websocketRealtimeData() {
|
|||||||
newData.forEach((item) => {
|
newData.forEach((item) => {
|
||||||
item.dte = daysLeft(item?.date_expiration);
|
item.dte = daysLeft(item?.date_expiration);
|
||||||
});
|
});
|
||||||
|
if(newData?.length > rawData?.length) {
|
||||||
rawData = newData;
|
rawData = newData;
|
||||||
|
displayedData = rawData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ruleOfList?.length !== 0 || filterQuery?.length !== 0) {
|
if (ruleOfList?.length !== 0 || filterQuery?.length !== 0) {
|
||||||
@ -510,11 +519,11 @@ async function saveCookieRuleOfList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isLoaded = true;
|
isLoaded = true;
|
||||||
/*
|
|
||||||
if ($isOpen) {
|
if ($isOpen) {
|
||||||
await websocketRealtimeData();
|
await websocketRealtimeData();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -667,6 +676,8 @@ function calculateStats(data) {
|
|||||||
const getHistoricalFlow = async () => {
|
const getHistoricalFlow = async () => {
|
||||||
// Create a delay using setTimeout wrapped in a Promise
|
// Create a delay using setTimeout wrapped in a Promise
|
||||||
if(data?.user?.tier === 'Pro') {
|
if(data?.user?.tier === 'Pro') {
|
||||||
|
|
||||||
|
mode = false;
|
||||||
isLoaded = false;
|
isLoaded = false;
|
||||||
|
|
||||||
displayRules = allRows?.filter(row => ruleOfList.some(rule => rule.name === row.rule));
|
displayRules = allRows?.filter(row => ruleOfList.some(rule => rule.name === row.rule));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user