@ikas/storefront 0.1.22-alpha.4 → 0.1.22-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.es.js CHANGED
@@ -33357,14 +33357,18 @@ var AnalyticsBody = function () {
33357
33357
  var gtmId = IkasStorefrontConfig.gtmId;
33358
33358
  var fbpId = IkasStorefrontConfig.fbpId;
33359
33359
  var router = useRouter();
33360
- var routeChangeListener = function () {
33361
- console.log("route change");
33362
- //@ts-ignore
33363
- IkasStorefrontConfig.store.customerStore.routeChangeInit();
33364
- };
33365
33360
  useEffect(function () {
33366
- router.events.on("routeChangeStart", routeChangeListener);
33367
- return function () { return router.events.off("routeChangeStart", routeChangeListener); };
33361
+ var handleRouteChange = function () {
33362
+ console.log("route change");
33363
+ //@ts-ignore
33364
+ IkasStorefrontConfig.store.customerStore.routeChangeInit();
33365
+ };
33366
+ router.events.on("routeChangeStart", handleRouteChange);
33367
+ // If the component is unmounted, unsubscribe
33368
+ // from the event with the `off` method:
33369
+ return function () {
33370
+ router.events.off("routeChangeStart", handleRouteChange);
33371
+ };
33368
33372
  }, []);
33369
33373
  return (createElement(Fragment$1, null,
33370
33374
  gtmId && (createElement("noscript", { dangerouslySetInnerHTML: {
package/build/index.js CHANGED
@@ -33364,14 +33364,18 @@ var AnalyticsBody = function () {
33364
33364
  var gtmId = IkasStorefrontConfig.gtmId;
33365
33365
  var fbpId = IkasStorefrontConfig.fbpId;
33366
33366
  var router$1 = router.useRouter();
33367
- var routeChangeListener = function () {
33368
- console.log("route change");
33369
- //@ts-ignore
33370
- IkasStorefrontConfig.store.customerStore.routeChangeInit();
33371
- };
33372
33367
  React.useEffect(function () {
33373
- router$1.events.on("routeChangeStart", routeChangeListener);
33374
- return function () { return router$1.events.off("routeChangeStart", routeChangeListener); };
33368
+ var handleRouteChange = function () {
33369
+ console.log("route change");
33370
+ //@ts-ignore
33371
+ IkasStorefrontConfig.store.customerStore.routeChangeInit();
33372
+ };
33373
+ router$1.events.on("routeChangeStart", handleRouteChange);
33374
+ // If the component is unmounted, unsubscribe
33375
+ // from the event with the `off` method:
33376
+ return function () {
33377
+ router$1.events.off("routeChangeStart", handleRouteChange);
33378
+ };
33375
33379
  }, []);
33376
33380
  return (React.createElement(React.Fragment, null,
33377
33381
  gtmId && (React.createElement("noscript", { dangerouslySetInnerHTML: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.1.22-alpha.4",
3
+ "version": "0.1.22-alpha.5",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",