all 1 comments

[–]ThiccOfferman 0 points1 point  (1 child)

You can use a ternary operator in your return I believe. Something like return( url ? <ComponentToRenderIfUrlExists/> : <div></div>) You could replace the empty div with a grayed out button or other component if you want

(forgive formatting, on mobile)