import wixUsers from 'wix-users';
import wixData from 'wix-data';
$w.onReady(function () {
wixUsers.onLogin((user) => {
let userId = user.id;
$w('#userDataset').setFilter(wixData.filter().eq('_id', userId));
$w('#userDataset').onReady(() => {
let userData = $w('#userDataset').getCurrentItem();
// Display user information on profile page
$w('#profileUserName').text = userData.username;
// Check if the user is verified
if (userData.verified) {
// Display blue checkmark
$w('#blueCheckmark').show();
} else {
// Hide blue checkmark
$w('#blueCheckmark').hide();
}
});
});
});