getCurrentItem - Issue with Reference Fields

Hello!

I’m using a method of allowing users to add gallery items to favorites using the method here:
https://www.wix.com/velo/forum/coding-with-velo/how-to-make-a-favorites-page-for-users

Using the following code which “saves” the item into a different Dataset which I’ve named “Favorites”

import wixData from ‘wix-data’ ;

export function button1_click ( event ) {
const item = $w ( ‘#dynamicDataset’ ). getCurrentItem ();
wixData . insert ( ‘Projects1’ , { item });
}

The issue is that no matter which button I press in the repeater, the the first item is always saved. Please see attached screen shots.