Please bare with me... I am learning to code.... What is the proper way to code a page when you have multiple codes listed. My console is telling me to move my export functions to the top of the page, but some of my export function are part of another code.. I am assuming you have to keep codes( functions) together in order for them to work correct?
I want to make sure my layout is correct and easy to read. Any suggestions on the proper way to code a page if this is such a thing?
I am sorry if I was not clear. I meant there are more than one code listed within my page. I had to move all my export function to the top of the page in order for the export error to go away. But some of these export function go with other codes. I just thought I had to keep them together in order for them to work properly.
import wixData from 'wix-data'; import wixUsers from 'wix-users'; import wixWindow from 'wix-window'; import wixLocation from 'wix-location'; export function radioRating_change(event, $w) { $w('#rateError').hide(); } export function viewAddress_click(event) { if ($w("#addressbox").hidden) { $w("#addressbox").show(); } else { $w("#addressbox").hide(); } } export function pinterestShare_click(event) { $w("#pinterestShare").target = "_blank"; } export function twitterShare_click(event) { $w("#twitterShare").target = "_blank"; } export function facebookShare_click(event) { $w("#facebookShare").target = "_blank"; } export function mailShare_click(event) { $w("#mailShare").target = "_blank"; } export function whatsappShare_click(event) { $w("#whatsappShare").target = "_blank"; } export function googleShare_click(event) { $w("#googleShare").target = "_blank"; } export function bookmarkGoogle_click(event) { $w("#bookmarkGoogle").target = "_blank"; } export function messengerShare_click(event) { $w("#messengerShare").target = "_blank"; } export function downloadButton_click(event) { wixLocation.to(`https://static.wixstatic.com/media/${url}?dn=${filename}`); } export function like_click(event) { wixData.insert('Likes', {likedprofile: $w('#dynamicDataset').getCurrentItem()._id}), $w('#profileLiked').show(), $w('#like').hide(); }
Please explain your problem in more details. What multiple codes? Where is the export?
See the article Wix Code: Working in the Code Panel for guidance.