From 6cb399e7267ae78e3e498bdbf5f51678ffb2cd45 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 21 Feb 2023 23:24:14 +0100
Subject: feat: Many things

Configure sanity in same project as the app
Implement type safe sanity schema
Read localised documents
Strip down design
---
 src/components/locale-switcher.svelte | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

(limited to 'src/components/locale-switcher.svelte')

diff --git a/src/components/locale-switcher.svelte b/src/components/locale-switcher.svelte
index 938d18a..aa4e0c4 100644
--- a/src/components/locale-switcher.svelte
+++ b/src/components/locale-switcher.svelte
@@ -35,12 +35,8 @@
 
 <svelte:window on:popstate={handlePopStateEvent} />
 
-<ul>
-	{#each locales as l}
-		<li>
-			<a class:active={l === $locale} href={`${replaceLocaleInUrl($page.url, l)}`}>
-				{l}
-			</a>
-		</li>
-	{/each}
-</ul>
+{#if $locale == "en"}
+	<a href={replaceLocaleInUrl($page.url, "nb")}>Norsk Bokmål</a>
+{:else if $locale == "nb"}
+	<a href={replaceLocaleInUrl($page.url, "en")}>English</a>
+{/if}
-- 
cgit v1.3

