diff --git a/packages/strapi-helper-plugin/lib/src/components/InputSearch/styles.scss b/packages/strapi-helper-plugin/lib/src/components/InputSearch/styles.scss index 02f7aadd5c..ecaf67761b 100644 --- a/packages/strapi-helper-plugin/lib/src/components/InputSearch/styles.scss +++ b/packages/strapi-helper-plugin/lib/src/components/InputSearch/styles.scss @@ -3,8 +3,6 @@ height: 3.4rem; margin-top: .9rem; padding-left: 0.9rem; - // TODO check with @aurelsicoko if it's the right color - // background-color: rgba(16, 22, 34, 0.02); background-color: #FAFAFB; border: 1px solid #E3E9F3; border-right: 0; diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/reducer.js b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/reducer.js index 0519c286c4..f89bcecb82 100644 --- a/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/reducer.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/ListPage/reducer.js @@ -28,12 +28,12 @@ function listPageReducer(state = initialState, action) { switch (action.type) { case DELETE_DATA_SUCCESS: return state.update('records', (list) => ( - list.filter(o => { - if (o._id) { - return o._id !== action.id; + list.filter(obj => { + if (obj._id) { + return obj._id !== action.id; } - return o.id !== parseInt(action.id, 10); + return obj.id !== parseInt(action.id, 10); }) )); case CHANGE_PARAMS: diff --git a/packages/strapi-plugin-upload/admin/src/components/FileIcon/index.js b/packages/strapi-plugin-upload/admin/src/components/FileIcon/index.js index 3cb7077397..de26e59e65 100644 --- a/packages/strapi-plugin-upload/admin/src/components/FileIcon/index.js +++ b/packages/strapi-plugin-upload/admin/src/components/FileIcon/index.js @@ -11,15 +11,23 @@ import cn from 'classnames'; import styles from './styles.scss'; function FileIcon({ fileType }) { - let iconType = fileType; - - if ( ['jpeg', 'jpg', 'png', 'gif'].includes(fileType) ) { - iconType = 'image'; - } - - if ( ['avi', 'm4v', 'mpg', 'mp4', 'mov'].includes(fileType) ) { - iconType = 'video'; - } + const iconType = (() => { + switch (fileType) { + case 'jpg': + case 'jpeg': + case 'png': + case 'gif': + return 'image'; + case 'mov': + case 'avi': + case 'mpg': + case 'm4v': + case 'mp4': + return 'video'; + default: + return fileType; + }; + })(); return (