This commit is contained in:
MuslemRahimi 2025-03-12 17:40:32 +01:00
parent efbcc006ea
commit 118419c0ba
3 changed files with 239 additions and 256 deletions

View File

@ -1,3 +1,6 @@
export const ssr = true;
export const load = ({ locals, cookies }) => {
const { user, isUSRegion, wsURL } = locals;
const themeMode = cookies.get("theme-mode") || "dark"; // Default to dark

View File

@ -1246,7 +1246,7 @@
-->
<slot />
<ModeWatcher />
<ModeWatcher defaultMode="light"/>
<Toaster position="top-center" />
{#if Cookie && $showCookieConsent === true}
<Cookie />

View File

@ -9,8 +9,6 @@
export let data;
let isLoaded = true;
let rawData = data?.getTopAnalyst;
let originalData = [...rawData]; // Unaltered copy of raw data
@ -156,13 +154,12 @@
<h1 class="mb-1 text-2xl sm:text-3xl font-bold">
Top Wall Street Analysts
</h1>
<p class="mb-3 px-1 font-semibold text-muted sm:px-0">
<p class="mb-3 px-1 font-semibold sm:px-0">
A list of Wall Street Analysts, ranked by their performance
</p>
</div>
<div class="w-full m-auto mt-16">
{#if isLoaded}
<div class="w-full m-auto mt-10">
<div
class="w-full m-auto rounded-none sm:rounded-md mb-4 overflow-x-auto sm:overflow-hidden"
>
@ -293,30 +290,14 @@
</tbody>
</table>
</div>
{:else}
<div class="flex justify-center items-center h-80">
<div class="relative">
<label
class="bg-secondary rounded-md h-14 w-14 flex justify-center items-center absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
>
<span
class="loading loading-spinner loading-md text-gray-400"
></span>
</label>
</div>
</div>
{/if}
</div>
{#if isLoaded}
<UpgradeToPro {data} />
<div class="mt-4 py-6 xl:mt-10 border-t border-gray-200">
<div class="mx-auto max-w-7xl px-3 xs:px-6 lg:px-8">
<div class="mx-auto max-w-2xl md:text-center">
<h3
class="mt-2 text-2xl font-bold tracking-tight bp:text-3xl"
>
<h3 class="mt-2 text-2xl font-bold tracking-tight bp:text-3xl">
Analyst Star Rankings
</h3>
<p class="mt-3 leading-8 xl:text-lg">
@ -400,8 +381,8 @@
Rating Count
</dt>
<dd class="mt-2 leading-7">
The more ratings the analyst has provided, the higher
the score.
The more ratings the analyst has provided, the higher the
score.
</dd>
</div>
<div class="relative pl-14">
@ -434,7 +415,6 @@
</div>
</div>
</div>
{/if}
</main>
<aside class="hidden lg:block relative fixed w-1/4 ml-4">
<div