mario-core 1.0.1-sandbox → 1.0.2-sandbox

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/dist/index.js CHANGED
@@ -5026,16 +5026,6 @@ var TheLayout = function TheLayout(_ref) {
5026
5026
  var location = reactRouterDom.useLocation();
5027
5027
  var isNotification = location.pathname.includes("notifications");
5028
5028
  var isDistrict = window.location.host.includes("-district");
5029
- var pusherCluster = reactRedux.useSelector(function (state) {
5030
- var _state$common, _state$common$user;
5031
-
5032
- return (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.pusherCluster;
5033
- });
5034
- var pusherKey = reactRedux.useSelector(function (state) {
5035
- var _state$common2, _state$common2$user;
5036
-
5037
- return (_state$common2 = state.common) === null || _state$common2 === void 0 ? void 0 : (_state$common2$user = _state$common2.user) === null || _state$common2$user === void 0 ? void 0 : _state$common2$user.pusherKey;
5038
- });
5039
5029
 
5040
5030
  var handleToggleModel = function handleToggleModel() {
5041
5031
  setOpenModelSelectRole(!openModelSelectRole);
@@ -5079,29 +5069,9 @@ var TheLayout = function TheLayout(_ref) {
5079
5069
  React.useEffect(function () {
5080
5070
  checkAuthentication();
5081
5071
  }, []);
5082
- React.useEffect(function () {
5083
- var pusher;
5084
-
5085
- if (pusherKey && pusherCluster) {
5086
- pusher = new Pusher(pusherKey, {
5087
- cluster: pusherCluster
5088
- });
5089
- var channel = pusher.subscribe("" + SANDBOX_NOTIFICATION);
5090
- channel.bind(SANDBOX_NOTIFICATION, function (data) {
5091
- console.log(SANDBOX_NOTIFICATION, {
5092
- data: data
5093
- });
5094
- getInformationSetting();
5095
- });
5096
- }
5097
-
5098
- return function () {
5099
- return pusher && pusher.unsubscribe("" + getInformationSetting);
5100
- };
5101
- }, [pusherKey, pusherCluster]);
5102
5072
  React.useEffect(function () {
5103
5073
  getInformationSetting();
5104
- }, []);
5074
+ }, [location.pathname]);
5105
5075
 
5106
5076
  var checkAuthentication = function checkAuthentication() {
5107
5077
  try {