remove cache

This commit is contained in:
MuslemRahimi 2025-01-22 16:40:10 +01:00
parent d35b2eba2b
commit 2960bd6c83
3 changed files with 17 additions and 20 deletions

View File

@ -2,7 +2,7 @@ import { error, fail, redirect } from "@sveltejs/kit";
import { validateData } from "$lib/utils"; import { validateData } from "$lib/utils";
import { loginUserSchema, registerUserSchema } from "$lib/schemas"; import { loginUserSchema, registerUserSchema } from "$lib/schemas";
export const load = async ({ locals, setHeaders }) => { export const load = async ({ locals }) => {
const { apiKey, apiURL } = locals; const { apiKey, apiURL } = locals;
const getDashboard = async () => { const getDashboard = async () => {
@ -18,7 +18,6 @@ export const load = async ({ locals, setHeaders }) => {
return output; return output;
}; };
setHeaders({ "cache-control": "public, max-age=60" });
// Make sure to return a promise // Make sure to return a promise
return { return {

View File

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { stockTicker } from "$lib/store"; import { stockTicker } from "$lib/store";
//import ArrowLogo from "lucide-svelte/icons/move-up-right"; import ArrowLogo from "lucide-svelte/icons/move-up-right";
import { page } from "$app/stores"; import { page } from "$app/stores";
export let data; export let data;
@ -56,7 +56,7 @@
<div <div
class="relative flex justify-center items-start overflow-hidden w-full" class="relative flex justify-center items-start overflow-hidden w-full"
> >
<main class="w-full"> <main class="w-full lg:w-3/4 lg:pr-10">
<nav <nav
class="sm:ml-4 overflow-x-scroll pt-1 text-sm sm:text-[1rem] whitespace-nowrap" class="sm:ml-4 overflow-x-scroll pt-1 text-sm sm:text-[1rem] whitespace-nowrap"
> >
@ -124,9 +124,8 @@
<slot /> <slot />
</div> </div>
</main> </main>
<!--
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div <div
class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100" class="w-full text-white border border-gray-600 rounded-md h-fit pb-4 mt-4 cursor-pointer bg-inherit sm:hover:bg-secondary transition ease-out duration-100"
> >
@ -165,7 +164,6 @@
</a> </a>
</div> </div>
</aside> </aside>
-->
</div> </div>
</div> </div>
</div> </div>

View File

@ -7,11 +7,7 @@
} from "$lib/store"; } from "$lib/store";
import DailyStats from "$lib/components/Options/DailyStats.svelte"; import DailyStats from "$lib/components/Options/DailyStats.svelte";
import { Chart } from "svelte-echarts"; import { Chart } from "svelte-echarts";
import { import { abbreviateNumberWithColor, monthNames } from "$lib/utils";
abbreviateNumber,
abbreviateNumberWithColor,
monthNames,
} from "$lib/utils";
import { onMount } from "svelte"; import { onMount } from "svelte";
import UpgradeToPro from "$lib/components/UpgradeToPro.svelte"; import UpgradeToPro from "$lib/components/UpgradeToPro.svelte";
import { init, use } from "echarts/core"; import { init, use } from "echarts/core";
@ -19,7 +15,6 @@
import { GridComponent, TooltipComponent } from "echarts/components"; import { GridComponent, TooltipComponent } from "echarts/components";
import { CanvasRenderer } from "echarts/renderers"; import { CanvasRenderer } from "echarts/renderers";
import Infobox from "$lib/components/Infobox.svelte"; import Infobox from "$lib/components/Infobox.svelte";
import * as HoverCard from "$lib/components/shadcn/hover-card/index.js";
use([BarChart, LineChart, GridComponent, TooltipComponent, CanvasRenderer]); use([BarChart, LineChart, GridComponent, TooltipComponent, CanvasRenderer]);
@ -428,12 +423,16 @@
<td class="text-white font-semibold text-sm text-center" <td class="text-white font-semibold text-sm text-center"
>P Volume</td >P Volume</td
> >
<!--
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>Vol/30D</td >Vol/30D</td
> >
-->
<!--
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>🐻/🐂 Prem</td >🐻/🐂 Prem</td
> >
-->
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>Total OI</td >Total OI</td
> >
@ -446,12 +445,14 @@
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>P Prem</td >P Prem</td
> >
<!--
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>Net Prem</td >Net Prem</td
> >
<td class="text-white font-semibold text-sm text-end" <td class="text-white font-semibold text-sm text-end"
>Total Prem</td >Total Prem</td
> >
-->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -509,22 +510,21 @@
> >
{item?.put_volume?.toLocaleString("en-US")} {item?.put_volume?.toLocaleString("en-US")}
</td> </td>
<!--
<td class="text-sm sm:text-[1rem] text-white text-end"> <td class="text-sm sm:text-[1rem] text-white text-end">
{item?.avgVolumeRatio?.toFixed(2)} {item?.avgVolumeRatio?.toFixed(2)}
</td> </td>
-->
<!--
<td class="text-sm sm:text-[1rem] text-end"> <td class="text-sm sm:text-[1rem] text-end">
<HoverCard.Root> <HoverCard.Root>
<HoverCard.Trigger <HoverCard.Trigger
class="rounded-sm underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-8 focus-visible:outline-black" class="rounded-sm underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-8 focus-visible:outline-black"
> >
<div class="flex items-center justify-end"> <div class="flex items-center justify-end">
<!-- Bar Container -->
<div <div
class="flex w-full max-w-28 h-5 bg-gray-200 rounded-md overflow-hidden" class="flex w-full max-w-28 h-5 bg-gray-200 rounded-md overflow-hidden"
> >
<!-- Bearish -->
<div <div
class="bg-red-500 h-full" class="bg-red-500 h-full"
style="width: calc(({item style="width: calc(({item
@ -534,7 +534,6 @@
?.premium_ratio[2]})) * 100%)" ?.premium_ratio[2]})) * 100%)"
></div> ></div>
<!-- Neutral -->
<div <div
class="bg-gray-300 h-full" class="bg-gray-300 h-full"
style="width: calc(({item style="width: calc(({item
@ -544,7 +543,6 @@
?.premium_ratio[2]})) * 100%)" ?.premium_ratio[2]})) * 100%)"
></div> ></div>
<!-- Bullish -->
<div <div
class="bg-green-500 h-full" class="bg-green-500 h-full"
style="width: calc(({item style="width: calc(({item
@ -589,6 +587,7 @@
</HoverCard.Content> </HoverCard.Content>
</HoverCard.Root> </HoverCard.Root>
</td> </td>
-->
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end text-white">
{@html abbreviateNumberWithColor( {@html abbreviateNumberWithColor(
@ -635,7 +634,7 @@
true, true,
)} )}
</td> </td>
<!--
<td class="text-sm sm:text-[1rem] text-end text-white"> <td class="text-sm sm:text-[1rem] text-end text-white">
{@html abbreviateNumberWithColor( {@html abbreviateNumberWithColor(
item?.net_premium, item?.net_premium,
@ -651,6 +650,7 @@
true, true,
)} )}
</td> </td>
-->
</tr> </tr>
{/each} {/each}
</tbody> </tbody>