Hey! So i am trying to make this copy to clipboard button, which is supposed to take an email fetched from Sanity and copy it inside the user's clipboard.
I have tried putting inside an onclick attribute on the button a function call but it didn't work due to syntax errors. I was also thinking about putting the email inside a data attribute and somehow figure out a way to copy it from there. Now I am out of ideas and I was wondering if you could give me some clues to solve this xD.
Thank you so much !