refactor: convert function expressions to declarations (#4926)

This commit is contained in:
Vladislav Shkodin
2021-02-08 20:01:21 +02:00
committed by GitHub
parent c0236536dd
commit 141a2eba56
241 changed files with 3444 additions and 2933 deletions

View File

@ -35,7 +35,7 @@ const initialState = Map({
key: '',
});
const entryDraftReducer = (state = Map(), action) => {
function entryDraftReducer(state = Map(), action) {
switch (action.type) {
case DRAFT_CREATE_FROM_ENTRY:
// Existing Entry
@ -180,9 +180,9 @@ const entryDraftReducer = (state = Map(), action) => {
default:
return state;
}
};
}
export const selectCustomPath = (collection, entryDraft) => {
export function selectCustomPath(collection, entryDraft) {
if (!selectHasMetaPath(collection)) {
return;
}
@ -192,6 +192,6 @@ export const selectCustomPath = (collection, entryDraft) => {
const extension = selectFolderEntryExtension(collection);
const customPath = path && join(collection.get('folder'), path, `${indexFile}.${extension}`);
return customPath;
};
}
export default entryDraftReducer;