I’m sure I mangled your instructions! Can you tell me what’s wrong with this picture?
import wixLocation from ‘wix-location’;
import {local} from ‘wix-storage’;
const linkField = “link-mobilestorytimekit-Kit-Info-title”; // replace this value
$w.onReady( function () {
$w(“#dataset1”).onReady(() => {
const numberOfItems = $w(“#dataset1”).getTotalCount();
$w("#repeater1").onItemReady( ($item, itemData, index) => {
$item(“#text47”).onClick( (event) => {
wixLocation.to(itemData[“link-mobilestorytimekit-Kit-Info-title”]);
$w("#dataset1").getItems(0, numberOfItems)
.then( (result) => {
const dynamicPageURLs = result.items.map(item => item[linkField]);
local.setItem(‘dynamicPageURLs’, dynamicPageURLs);
} )
. catch ( (err) => {
console.log(err.code, err.message);
} );
} );
})
It doesn’t like the punctuation at the end, that’s for sure.