- Press F12 if you use google-Chrome-Browser
- go to ---> CONSOLE
- look at the results
CODE
import wixLocation from 'wix-location';
import wixData from 'wix-data';
$w.onReady(function() { })
export function button7_click(event) {
let EmailInput = $w('#input7').value;
console.log(EmailInput)
wixData.query('myDatabase')
.eq('email', EmailInput)
.find()
.then(result => {
let numberOfItems = result.totalCount;
console.log(numberOfItems)
if (numberOfItems === 0) {
wixLocation.to("https://www.ebay.com");
}
else {
let callsign = ".com/" //---> deaktivated //$w('#input7').value;
wixLocation.to("https://www.google" + callsign);
}
})
}