Hi Jane,
Thanks so much for reaching out! Our engineering team is going to investigate why state.location.path isn’t currently working for you. In the meantime, you can use window.location in your logic instead. For your custom JS code, you can change it to:
var url =
"https://clickfrenzy-public-data-janecf.s3-ap-southeast-2.amazonaws.com/brands.json";
fetch(url)
.then((res) => res.json())
.then((data) => {
state.brands = data.brands;
var pathArray = window.location.pathname.split("/");
var slug = pathArray[pathArray.length - 1];
if (slug) {
state.brand = state.brands.find((brand) => brand.slug === slug);
console.log(state.brand);
}
});
From there, you’ll need to visit a url with the proper path, not just /brands, such as: https://clickfrenzy.com/au/brands/click-frenzy-julove
Let us know if you have any questions!