Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@filerobot/explorer / lib / utils / toggleFolderNotFoundModal.js
Size: Mime:
import { createElement } from 'react';
import { Warning } from '@scaleflex/icons';
import { PC } from '@filerobot/common';
var toggleFolderNotFoundModal = function toggleFolderNotFoundModal(_ref) {
  var response = _ref.response,
    i18n = _ref.i18n,
    toggleModal = _ref.toggleModal,
    theme = _ref.theme,
    queryParamValue = _ref.queryParamValue,
    rootFolderPath = _ref.rootFolderPath;
  if (response.code === 'FOLDER_NOT_FOUND' && queryParamValue && queryParamValue !== rootFolderPath) {
    toggleModal(true, {
      icon: /*#__PURE__*/createElement(Warning, {
        color: theme.palette[PC.Warning]
      }),
      title: i18n('explorerFolderNotFoundTitle'),
      content: i18n('explorerFolderNotFoundText'),
      buttonPrimaryLabel: i18n('explorerModelOkButton'),
      onButtonPrimaryClick: function onButtonPrimaryClick() {
        return toggleModal(false);
      }
    });
  }
};
export default toggleFolderNotFoundModal;