perf(App.vue): añadido Header con condiciones a App

parent 75bfdba0
Showing with 12 additions and 0 deletions
<script setup> <script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import Footer from './components/Footer.vue'; import Footer from './components/Footer.vue';
import Header from './components/Header.vue';
const route = useRoute();
const isAuthView = computed(() => {
return route.path.startsWith('/auth');
});
const showSearch = computed(() => {
return route.path === '/recipes' || route.path === '/users/management';
});
</script> </script>
<template> <template>
<div class="d-flex flex-column min-vh-100"> <div class="d-flex flex-column min-vh-100">
<Header v-if="!isAuthView" :show-search="showSearch"></Header>
<router-view></router-view> <router-view></router-view>
<Footer></Footer> <Footer></Footer>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment