magneto365.ui 2.63.3 → 2.63.4

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/esm/index.js CHANGED
@@ -8452,6 +8452,11 @@ var JobsPage = function (_a) {
8452
8452
  setJobSelected(null);
8453
8453
  }, [setJobSelected]);
8454
8454
  var hasVacancies = useMemo(function () { return !!(vacantProps === null || vacantProps === void 0 ? void 0 : vacantProps.length) || isLoading; }, [isLoading, vacantProps === null || vacantProps === void 0 ? void 0 : vacantProps.length]);
8455
+ useEffect(function () {
8456
+ if (!jobSelected && showDetail && device === 'mobile') {
8457
+ onClose();
8458
+ }
8459
+ }, [device, jobSelected, onClose, showDetail]);
8455
8460
  var JobDetailsDrawerComponent = useMediaQuery(React.createElement(JobDetailContainer, { onClose: onClose, isOpen: showDetail && hasVacancies }, jobDetailAction ? (jobDetailAction) : (React.createElement(JobDetailsDrawer, __assign({}, jobDetailsDrawerProps, { isLoading: isLoading || !jobSelected, selectedJobId: selectedJobId, loadVideo: loadVideo, setLoadVideo: setLoadVideo })))), {
8456
8461
  lg: (React.createElement(MobileJobDetailsDrawer, __assign({}, mobileJobDetailsDrawerProps, { onClose: onClose, isOpen: showDetail, jobDetailAction: jobDetailAction, isLoading: isLoading || !jobSelected, loadVideo: loadVideo, setLoadVideo: setLoadVideo })))
8457
8462
  });