Skip to content

Commit

Permalink
feat: redirect / to /posts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 22, 2023
1 parent 496e2b7 commit 3ec9e30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/layout/navigation/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<div class="my-6 flex shrink-0 flex-col items-center justify-center gap-2">
<img
alt="Logo"
class="h-24 w-full"
class="h-24 w-full opacity-95"
height="16"
loading="eager"
src="/icon.svg"
Expand Down
11 changes: 10 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<script setup></script>
<script lang="ts" setup>
definePageMeta({
middleware: [
// Redirect to /posts with the same params
function (to, from) {
return navigateTo({ path: '/posts', query: to.query, hash: to.hash })
}
]
})
</script>

<template>
<main>
Expand Down

0 comments on commit 3ec9e30

Please sign in to comment.