From two buttons need to make one (depending on button link)

Hello everyone.
Gelandewagen 4x4 parts, Gelandewagen 6x6 parts and ferrari lim must linked to another page, but all other must linked to product page.

So create 2 buttons and try to change them by “if else”
like if button1 have link (to another page) - hidden button2 (to product page)

but its doesn’t working


$w.onReady( function () {

let productButton = $w( “#button2” ),
linkButton = $w( “#button1” );

linkButton === true ? linkButton != productButton : productButton.hide()
});


somebody knows how to make it?)))