Skip to content
Snippets Groups Projects
Commit b21d85a0 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

refactor(filters): remove unsed params and fix typos

parent 1c7803e4
No related branches found
No related tags found
1 merge request!13Sprint #14
......@@ -6,9 +6,6 @@ import { compose, withProps } from 'recompose'
import { DashboardItems, DashboardFilters } from './'
const Dashboard = ({
dashboard,
filterItems,
filterValues,
deleteProject,
dashboardItems,
getFilterOptions,
......
......@@ -4,12 +4,6 @@ import { Menu, th } from '@pubsweet/ui'
import { compose, withHandlers } from 'recompose'
const DashboardFilters = ({
// view,
status,
listView,
createdAt,
changeSort,
changeFilter,
getFilterOptions,
changeFilterValue,
getDefaultFilterValue,
......
......@@ -10,7 +10,7 @@ export const SORT_VALUES = {
}
const options = [
{ label: 'Imporant first', value: SORT_VALUES.MORE_IMPORTANT },
{ label: 'Important first', value: SORT_VALUES.MORE_IMPORTANT },
{ label: 'Less important first', value: SORT_VALUES.LESS_IMPORTANT },
]
......
......@@ -18,10 +18,7 @@ export default config => Component => {
getFilterOptions: () => key => get(config, `${key}.options`) || [],
getDefaultFilterValue: ({ filterValues }) => key =>
get(filterValues, key) || '',
changeFilterValue: ({
setFilterValues,
filterValues,
}) => filterKey => value => {
changeFilterValue: ({ setFilterValues }) => filterKey => value => {
// ugly but recompose doesn't pass the new state in the callback function
let newState = {}
setFilterValues(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment