Repository URL to install this package:
|
Version:
3.12.18 ▾
|
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;