ducuingg
(Guillaume Ducuing)
September 28, 2022, 2:42pm
1
Hello !
I have an issue that i don't understand. I searched online but no clue for my code...
I tried to create my component 'Footer.vue' and i made the same as the Header.vue (i'm discovering)
from the multi page package. But when i create the props "footer" and insert
<div class="logo" v-if="footer.data.logo">
<PrismicImage :field="footer.data.logo" />
in template, i have this error undefined ready 'data'`..
here the link to my github repo : github repo
thanks for your help !
Guillaume
jake
(Jake Walters)
September 28, 2022, 5:20pm
2
Hi Guillaume,
I can see from your layouts/default.vue you're not passing any props to <Footer>
Also it looks like the formatting for the footer components isn't correct.
Try
<template>
<div class="text-slate-800">
<Header
v-if="navigation.data && settings.data"
:navigation="navigation"
:settings="settings"
/>
<main><nuxt /></main>
<Footer v-if="'data' in footer" :footer="footer" />
</div>
</template>
1 Like
ducuingg
(Guillaume Ducuing)
September 29, 2022, 7:04am
3
Thank you very much, i think i have to learn again about props.....
have a nice day !
1 Like