Refactor links in navbar
authorAdam Dullage <redacted>
Sat, 4 May 2024 08:16:29 +0000 (09:16 +0100)
committerAdam Dullage <redacted>
Sat, 4 May 2024 08:16:29 +0000 (09:16 +0100)
client/partials/NavBar.vue

index 28e5040db790eb9916e9b6afa471fde60ae9ae2b..65d60ed154a276ad30280b9906660ec12ab57327 100644 (file)
@@ -1,15 +1,13 @@
 <template>\r
   <nav class="mb-12 flex justify-between align-top">\r
-    <RouterLink to="/" v-if="!hideLogo">\r
+    <RouterLink :to="{ name: 'home' }" v-if="!hideLogo">\r
       <Logo responsive></Logo>\r
     </RouterLink>\r
     <div class="flex grow items-start justify-end">\r
       <!-- New Note -->\r
-      <CustomButton\r
-        :iconPath="mdilPlusCircle"\r
-        label="New Note"\r
-        @click="router.push({ name: 'note' })"\r
-      />\r
+      <RouterLink :to="{ name: 'note' }">\r
+        <CustomButton :iconPath="mdilPlusCircle" label="New Note" />\r
+      </RouterLink>\r
       <!-- Menu -->\r
       <CustomButton :iconPath="mdilMenu" label="Menu" @click="toggleMenu" />\r
       <PrimeMenu ref="menu" :model="menuItems" :popup="true" />\r
git clone https://git.99rst.org/PROJECT