https://shopify.dev/docs/api/checkout-ui-extensions/2024-04/components/actions/link
i both set to and onPress , this only navigate to the location specified by to , onPress is not execute as expected.
how can i use ?
<Link
to={shop.storefrontUrl}
onPress={() => {
conosle.log('onPress')
fetch(DATA_URL, {
method: "POST",
body: JSON.stringify({message: '1'}),
headers: {
"content-type": "application/json",
},
keepalive: true,
});
}}
>
{translate("Submit and leave")}
</Link>
