So, I am new to Corvid and Wix Code and want to create a member profile page where users can create content and display it on their profiles as well as the site. I followed the steps in this video:
https://www.youtube.com/watch?v=FVARVy3YS74&list=PL0y_aclKYoYhzHA9TbgEhzU68bvRI15mI&index=6
and I didn’t get a result, only an error on line 7. I already switched the names to fit my data but I want to know what I did wrong. I’ll send a screenshot of the site page I am working on the code with.
Here’s the code I worked with:
import wixData from ‘wix-data’;
function getData(){
let query = wixData.query(‘ImageUploads’);
return query.limit(1000).find().then(results => {
console.log(‘getData’, results);
return results.items;
});
}
$w.onReady( () => {
$w("#imageuploadswrite").onAfterSave( () => {
getData().the((items) => {
$w("#contentlist").data = items;
});
});
});
Here’s the screenshot of the page I’m working with:
If anyone can help me out with this, it is very much appreciated!