Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/routes/app._index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default function Index() {
revalidator.revalidate();
}
else if (response.result === 'declined-all') {
// just an example of conditionally giving context to the merchant
shopify.toast.show("In order to access this feature, you must grant access.", {
isError: true,
});
Expand All @@ -135,6 +136,7 @@ export default function Index() {
<s-page>
<ui-title-bar title="Remix app template">
{/* [START optional-scopes.request-scopes-top-button] */}
{/* Update this title bar button, as well as the button below */}
<button variant="primary" onClick={hasWriteProducts ? generateProduct : () => requestScopes(["write_products"])}>
{hasWriteProducts ? "Generate a product" : "Request access to write products"}
</button>
Expand Down