From 8b5b68f23259c042d4093b5be62bb53a4b9c1527 Mon Sep 17 00:00:00 2001 From: pheralb Date: Thu, 13 Mar 2025 14:28:56 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Refactor=20layout=20to?= =?UTF-8?q?=20remove=20server-side=20loading=20+=20use=20app/stores=20to?= =?UTF-8?q?=20get=20current=20pathname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/+layout.server.ts | 7 ------ src/routes/+layout.svelte | 41 +++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 src/routes/+layout.server.ts diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts deleted file mode 100644 index fc1cf6d..0000000 --- a/src/routes/+layout.server.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { LayoutServerLoad } from './$types'; -import { fetchGitHubStars } from '@/utils/getStarsRepository'; - -export const load: LayoutServerLoad = async ({ url: { pathname } }) => { - const stars = await fetchGitHubStars(); - return { pathname, stars }; -}; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 8b38947..d1ea79a 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,23 +1,15 @@ - +