Dark Modern Website - Build a Animated Website with SvelteKit, GSAP & Prismic

Hi :wave:t3:

I'm following Alex Trost's tutorial called Build a Animated Website with SvelteKit, GSAP & Prismic on Youtube and I'm blocked when trying to use the "mapper" functions to get repeated content from the "CaseStudies" slices.

I can imagine it has something to do with the new way of Prismic to use the repeat field group but I can’t figure how to fix the issue.

Any help would be really appreciated :pray:t3:

Thanks in advance,

Paul

Ok got it :white_check_mark:

I had to change a little bit of code in the mapper.js file where Alex wrote (line 10):
slice.items.map(async (item) => {

I had to change it for the new Repeatable Group like this:
slice.primary.items.map(async (item) => {

Now it's working!
I hope I can help others with this :innocent:

@alex.trost thanks for your tutorials with sveltekit, I'm having fun following them :+1:t3::orange_heart:

Paul

2 Likes