Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save remy727/9afd721a8b1e2959e7ae38a9a57caef9 to your computer and use it in GitHub Desktop.

Select an option

Save remy727/9afd721a8b1e2959e7ae38a9a57caef9 to your computer and use it in GitHub Desktop.

Revisions

  1. remy727 created this gist Nov 6, 2023.
    11 changes: 11 additions & 0 deletions detect-the-client-s-device-using-shopify-app-bridge-utilities.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import {
    isShopifyEmbedded,
    isMobile,
    isShopifyMobile,
    isShopifyPOS
    } from '@shopify/app-bridge/utilities';

    const onShopifyEmbedded = isShopifyEmbedded();
    const onMobile = isMobile();
    const onShopifyMobile = isShopifyMobile();
    const onShopifyPOS = isShopifyPOS();