So i tried the method provided by wix on how to do this. It did not work.
I tried to manually code hiding a button. I managed to hide the button on desktop but it wont show on mobile. I can see it in editing mode but not preview mode.
My code looks like this
import wixWindow from ‘wix-window’;
$w.onReady( function () {
if (wixWindow.formFactor === “Desktop”) {
$w(“#button1”).hide();
} else {
$w(“#button1”).show();
}
})
;
$w.onReady( function () {
if (wixWindow.formFactor === “Mobile”){
$w(“#button1”).show();
}
})
;