From aa071aac9718880fab132f96a9272d9ea20e9027 Mon Sep 17 00:00:00 2001
From: HJfod <60038575+HJfod@users.noreply.github.com>
Date: Mon, 4 Mar 2024 21:30:40 +0200
Subject: [PATCH] add href to navbar home button for seo

---
 src/components/Navbar.astro | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro
index 0c425c0..d07bc4f 100644
--- a/src/components/Navbar.astro
+++ b/src/components/Navbar.astro
@@ -20,7 +20,7 @@ const base = import.meta.env.BASE_URL;
 ">
     <div class="grid sm:grid-cols-3 max-sm:grid-cols-2 justify-center items-center">
         <div class="flex flex-row justify-start items-center gap-3">
-            <a class="home-button">
+            <a class="home-button" href={base}>
                 <!-- <Image src={logo} alt="Globed logo" class="w-[24px] h-[24px]"/> -->
                 <GlobeIcon/>
                 <span class="font-head text-xl">Globed</span>
@@ -77,6 +77,7 @@ const base = import.meta.env.BASE_URL;
 <script define:vars={{ base }}>
     document.querySelectorAll('.home-button').forEach(btn => {
         btn.addEventListener('click', e => {
+            e.preventDefault();
             if (window.matchMedia("(max-width: 640px)").matches) {
                 document.querySelector('nav')?.classList.toggle('open');
             }