import { local } from ‘wix-storage’ ;
import wixWindow from ‘wix-window’ ;
$w . onReady ( function () {
if (! local . getItem ( “firstTimePopupShown” )) {
wixWindow . openLightbox ( “Popup” );
local . setItem ( “firstTimePopupShown” , “yes” );
}
} );
Try this one…
import {local} from 'wix-storage';
import wixWindow from 'wix-window';
$w.onReady(function() {
let data = "add some data here if needed (OBJECT)";
let memoryData = local.getItem("firstTimePopupShown"); console.log("My-MEMORY-DATA: ", memoryData);
if(memoryData==="yes") {console.log("POPUP-MEMORY ACTIVE");
wixWindow.openLightbox("Popup", data);
}
else {console.log("POPUP-MEMORY NOT DEFINED YET, lets define it now for next checking round...");
local.setItem("firstTimePopupShown", "yes");
}
});