Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
import { useRouteCache } from '../../../../providers/RouteCache/index.js';
|
|
import { useTranslation } from '../../../../providers/Translation/index.js';
|
|
import { useDocumentDrawer } from '../../../DocumentDrawer/index.js';
|
|
import { ListSelectionButton } from '../../../ListSelection/index.js';
|
|
export const EditFolderAction = ({
|
|
id,
|
|
folderCollectionSlug
|
|
}) => {
|
|
const {
|
|
clearRouteCache
|
|
} = useRouteCache();
|
|
const {
|
|
t
|
|
} = useTranslation();
|
|
const [FolderDocumentDrawer,, {
|
|
closeDrawer,
|
|
openDrawer
|
|
}] = useDocumentDrawer({
|
|
id,
|
|
collectionSlug: folderCollectionSlug
|
|
});
|
|
if (!id) {
|
|
return null;
|
|
}
|
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
children: [/*#__PURE__*/_jsx(ListSelectionButton, {
|
|
onClick: openDrawer,
|
|
type: "button",
|
|
children: t('general:edit')
|
|
}), /*#__PURE__*/_jsx(FolderDocumentDrawer, {
|
|
onSave: () => {
|
|
closeDrawer();
|
|
clearRouteCache();
|
|
}
|
|
})]
|
|
});
|
|
};
|
|
//# sourceMappingURL=index.js.map |