diff --git a/client/src/actions/lists.js b/client/src/actions/lists.js index a7d409d..fcab0fc 100644 --- a/client/src/actions/lists.js +++ b/client/src/actions/lists.js @@ -127,5 +127,5 @@ export default { deleteList, handleListDelete, sortList, - handleListSort + handleListSort, }; diff --git a/client/src/components/List/ActionsStep.jsx b/client/src/components/List/ActionsStep.jsx index 3bbc28d..d4e8b39 100755 --- a/client/src/components/List/ActionsStep.jsx +++ b/client/src/components/List/ActionsStep.jsx @@ -8,7 +8,7 @@ import { useSteps } from '../../hooks'; import DeleteStep from '../DeleteStep'; import styles from './ActionsStep.module.scss'; -import SortStep from "../SortStep"; +import SortStep from '../SortStep'; const StepTypes = { DELETE: 'DELETE', @@ -38,25 +38,19 @@ const ActionsStep = React.memo(({ onNameEdit, onCardAdd, onDelete, onSort, onClo }, [openStep]); if (step && step.type) { - switch (step.type){ + switch (step.type) { case StepTypes.DELETE: return ( - - ); - case StepTypes.SORT: - return ( - + /> ); + case StepTypes.SORT: + return ; default: } } diff --git a/client/src/components/List/List.jsx b/client/src/components/List/List.jsx index 98d6941..f6a600f 100755 --- a/client/src/components/List/List.jsx +++ b/client/src/components/List/List.jsx @@ -16,7 +16,18 @@ import { ReactComponent as PlusMathIcon } from '../../assets/images/plus-math-ic import styles from './List.module.scss'; const List = React.memo( - ({ id, index, name, isPersisted, cardIds, canEdit, onUpdate, onDelete, onSort, onCardCreate }) => { + ({ + id, + index, + name, + isPersisted, + cardIds, + canEdit, + onUpdate, + onDelete, + onSort, + onCardCreate, + }) => { const [t] = useTranslation(); const [isAddCardOpened, setIsAddCardOpened] = useState(false); diff --git a/client/src/components/SortStep/SortStep.jsx b/client/src/components/SortStep/SortStep.jsx index 30fa599..bcf3d54 100644 --- a/client/src/components/SortStep/SortStep.jsx +++ b/client/src/components/SortStep/SortStep.jsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; -import {Button, Menu} from 'semantic-ui-react'; +import { Menu } from 'semantic-ui-react'; import { Popup } from '../../lib/custom-ui'; import styles from './SortStep.module.scss'; @@ -9,7 +9,7 @@ import styles from './SortStep.module.scss'; const SortStep = React.memo(({ title, onSort, onBack }) => { const [t] = useTranslation(); - const handeClick = (sortType) => onSort({sortType}) + const handeClick = (sortType) => onSort({ sortType }); return ( <> @@ -19,28 +19,28 @@ const SortStep = React.memo(({ title, onSort, onBack }) => { })} - - handeClick('createdat_asc')}> - {t('action.sort.createdFirst', { - context: 'title', - })} - - handeClick('createdat_desc')}> - {t('action.sort.createdLast', { - context: 'title', - })} - - handeClick('name_asc')}> - {t('action.sort.name', { - context: 'title', - })} - - handeClick('duedate_asc')}> - {t('action.sort.due', { - context: 'title', - })} - - + + handeClick('createdat_asc')}> + {t('action.sort.createdFirst', { + context: 'title', + })} + + handeClick('createdat_desc')}> + {t('action.sort.createdLast', { + context: 'title', + })} + + handeClick('name_asc')}> + {t('action.sort.name', { + context: 'title', + })} + + handeClick('duedate_asc')}> + {t('action.sort.due', { + context: 'title', + })} + + ); diff --git a/client/src/entry-actions/lists.js b/client/src/entry-actions/lists.js index f914b80..835d272 100755 --- a/client/src/entry-actions/lists.js +++ b/client/src/entry-actions/lists.js @@ -52,13 +52,14 @@ const handleListDelete = (list) => ({ }); const sortList = (id, data) => { - return ({ + return { type: EntryActionTypes.LIST_SORT, payload: { id, - data + data, }, - })}; + }; +}; const handleListSort = (list) => ({ type: EntryActionTypes.LIST_SORT_HANDLE, @@ -67,7 +68,6 @@ const handleListSort = (list) => ({ }, }); - export default { createListInCurrentBoard, handleListCreate, diff --git a/client/src/sagas/core/watchers/lists.js b/client/src/sagas/core/watchers/lists.js index 469e0e7..d4576aa 100644 --- a/client/src/sagas/core/watchers/lists.js +++ b/client/src/sagas/core/watchers/lists.js @@ -18,10 +18,10 @@ export default function* listsWatchers() { services.handleListUpdate(list), ), takeEvery(EntryActionTypes.LIST_SORT, ({ payload: { id, data } }) => - services.sortList(id, data), + services.sortList(id, data), ), takeEvery(EntryActionTypes.LIST_SORT_HANDLE, ({ payload: { list } }) => - services.handleListSort(list), + services.handleListSort(list), ), takeEvery(EntryActionTypes.LIST_MOVE, ({ payload: { id, index } }) => services.moveList(id, index),