Hi !
I am developing an ecommerce website on nuxt.js (based on vue.js)
When my default layout is mounted i try to check if an user is connected but even if it is the response is always ‘signout’, but when i put my code in a settimeout with a bit of time it’s working, any idea why the event is not triggering right ?
Thanks by advance !
mounted() {
document.addEventListener('snipcart.ready', function() {
const customer = Snipcart.store.getState().customer
console.log(customer)
})
}