Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
scrollLockManager,
subscribe = noop,
unsubscribe = noop,
}: CreateAppProviderContext = {}): Context {
const intl = new Intl(i18n);
const link = new Link(linkComponent);
const appBridge = apiKey
? createApp({
apiKey,
shopOrigin: shopOrigin || getShopOrigin(),
forceRedirect,
})
: undefined;
if (appBridge && appBridge.hooks) {
appBridge.hooks.set(LifecycleHook.DispatchAction, setClientInterfaceHook);
}
return {
polaris: {
intl,
link,
stickyManager: stickyManager || new StickyManager(),
scrollLockManager: scrollLockManager || new ScrollLockManager(),
subscribe,
unsubscribe,
appBridge,
},
};
}