TypeError Cannot read properties of undefined (reading 'data')

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 !


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.


  <div class="text-slate-800">
      v-if="navigation.data && settings.data"
    <main><nuxt /></main>
   <Footer v-if="'data' in footer" :footer="footer" />
1 Like

Thank you very much, i think i have to learn again about props..... :joy:
have a nice day !

1 Like