Hi all. So i have created a lightbox for data capture. It’s triggered when landing on the homepage. My issue is that i have inserted coding so then the local storage can detect whether the lightbox has popped up on the users browser before so it only shows up once. I get an error code " ‘local’ is not defined " (see below)
Hi,
To work with the local storage, you need to import it as on the first line of your code from the storage API.
import {local} from 'wix-storage';
However, I see that this line is commented out, meaning not executed. Please remove the comment to make it work.
Click here to learn more about working with local storage.
Fantastic! That’s resolved but i now get another error message “wixWindow” not defined. I have tried going through forums but im not sure what this means? I have tried replacing the “Data Capture” with the lightbox ID but no results.