@seamly/web-ui 22.3.5 → 22.3.6

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.
@@ -7582,12 +7582,14 @@ function useSessionExpiredCommand() {
7582
7582
  }
7583
7583
  } = (0,interrupt_hooks/* useInterrupt */.i)();
7584
7584
  const dispatch = (0,store/* useAppDispatch */.T)();
7585
- const seamlyCommands = (0,use_seamly_commands/* default */.Z)();
7585
+ const {
7586
+ reset
7587
+ } = (0,use_seamly_commands/* default */.Z)();
7586
7588
  const isExpiredError = (originalError === null || originalError === void 0 ? void 0 : originalError.name) === 'SeamlySessionExpiredError';
7587
7589
  const limit = (0,hooks_.useRef)(0);
7588
7590
  const limitTimer = (0,hooks_.useRef)(null);
7589
7591
  (0,hooks_.useEffect)(() => {
7590
- if (isExpiredError && seamlyCommands[action]) {
7592
+ if (isExpiredError && action === 'reset') {
7591
7593
  if (limit.current >= 10) {
7592
7594
  limitTimer.current = setTimeout(() => {
7593
7595
  limit.current = 0;
@@ -7604,12 +7606,12 @@ function useSessionExpiredCommand() {
7604
7606
  return () => {};
7605
7607
  }
7606
7608
  limit.current += 1;
7607
- seamlyCommands[action]();
7609
+ reset();
7608
7610
  }
7609
7611
  return () => {
7610
7612
  if (limitTimer.current) clearTimeout(limitTimer.current);
7611
7613
  };
7612
- }, [action, seamlyCommands, isExpiredError, dispatch]);
7614
+ }, [action, reset, isExpiredError, dispatch]);
7613
7615
  }
7614
7616
  ;// CONCATENATED MODULE: ./src/javascripts/ui/hooks/use-seamly-chat.ts
7615
7617
  var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {