diff --git a/src/routes/stocks/[tickerID]/financials/+layout.svelte b/src/routes/stocks/[tickerID]/financials/+layout.svelte index d86aedb4..18f583e7 100644 --- a/src/routes/stocks/[tickerID]/financials/+layout.svelte +++ b/src/routes/stocks/[tickerID]/financials/+layout.svelte @@ -72,6 +72,10 @@ Object.keys(sectionMap).find( (key) => sectionMap[key] === foundSection, ) || "income"; + + if (displaySubSection === "ratios" && $selectedTimePeriod === "ttm") { + $selectedTimePeriod = "annual"; + } } } @@ -156,16 +160,18 @@ > Quarterly - updateQuery("ttm")} - class="hidden sm:block p-2 px-5 cursor-pointer {$selectedTimePeriod === - 'ttm' - ? 'text-muted dark:text-white bg-[#EEEEEE] dark:bg-primary/90 font-semibold' - : 'text-blue-700 dark:text-gray-400 sm:hover:text-muted dark:sm:hover:text-white sm:hover:bg-[#EEEEEE] dark:sm:hover:bg-primary/90'}" - > - TTM - + {#if displaySubSection !== "ratios"} + updateQuery("ttm")} + class="hidden sm:block p-2 px-5 cursor-pointer {$selectedTimePeriod === + 'ttm' + ? 'text-muted dark:text-white bg-[#EEEEEE] dark:bg-primary/90 font-semibold' + : 'text-blue-700 dark:text-gray-400 sm:hover:text-muted dark:sm:hover:text-white sm:hover:bg-[#EEEEEE] dark:sm:hover:bg-primary/90'}" + > + TTM + + {/if}