From 87c0f355a21e909078ad00ececc0aacde7ca05a5 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 1 Nov 2024 10:30:07 +0100 Subject: [PATCH] ui fixes --- src/routes/stocks/[tickerID]/+layout.svelte | 36 ++++++++++--------- .../stocks/[tickerID]/forecast/+page.svelte | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/routes/stocks/[tickerID]/+layout.svelte b/src/routes/stocks/[tickerID]/+layout.svelte index c0589f51..1c489320 100644 --- a/src/routes/stocks/[tickerID]/+layout.svelte +++ b/src/routes/stocks/[tickerID]/+layout.svelte @@ -813,23 +813,25 @@ function handleTypeOfTrade(state:string) /> {/if} -
  • - changeSection("forecast")} - class="px-3 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySection === - 'forecast' - ? 'text-white ' - : 'bg-[#09090B]'}" - > - Forecast - -
    -
  • + {#if Object?.keys(data?.getAnalystRating ?? {})?.length > 0} +
  • + changeSection("forecast")} + class="px-3 text-sm sm:text-[1rem] font-medium text-gray-400 sm:hover:text-white {displaySection === + 'forecast' + ? 'text-white ' + : 'bg-[#09090B]'}" + > + Forecast + +
    +
  • + {/if}
  • 5 ? rawAnalystList?.slice(-6, -1) : rawAnalystList; + rawAnalystList?.length > 5 ? rawAnalystList?.slice(-6) : rawAnalystList; const categories = ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"]; function findIndex(data) {