chore: lint-fix

pull/717/head
Samuel 2 years ago
parent a974078289
commit 7b3155efe5

@ -127,5 +127,5 @@ export default {
deleteList, deleteList,
handleListDelete, handleListDelete,
sortList, sortList,
handleListSort handleListSort,
}; };

@ -8,7 +8,7 @@ import { useSteps } from '../../hooks';
import DeleteStep from '../DeleteStep'; import DeleteStep from '../DeleteStep';
import styles from './ActionsStep.module.scss'; import styles from './ActionsStep.module.scss';
import SortStep from "../SortStep"; import SortStep from '../SortStep';
const StepTypes = { const StepTypes = {
DELETE: 'DELETE', DELETE: 'DELETE',
@ -50,13 +50,7 @@ const ActionsStep = React.memo(({ onNameEdit, onCardAdd, onDelete, onSort, onClo
/> />
); );
case StepTypes.SORT: case StepTypes.SORT:
return ( return <SortStep title="common.sortList" onSort={onSort} onBack={handleBack} />;
<SortStep
title="common.sortList"
onSort={onSort}
onBack={handleBack}
/>
);
default: default:
} }
} }

@ -16,7 +16,18 @@ import { ReactComponent as PlusMathIcon } from '../../assets/images/plus-math-ic
import styles from './List.module.scss'; import styles from './List.module.scss';
const List = React.memo( 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 [t] = useTranslation();
const [isAddCardOpened, setIsAddCardOpened] = useState(false); const [isAddCardOpened, setIsAddCardOpened] = useState(false);

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'; 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 { Popup } from '../../lib/custom-ui';
import styles from './SortStep.module.scss'; import styles from './SortStep.module.scss';
@ -9,7 +9,7 @@ import styles from './SortStep.module.scss';
const SortStep = React.memo(({ title, onSort, onBack }) => { const SortStep = React.memo(({ title, onSort, onBack }) => {
const [t] = useTranslation(); const [t] = useTranslation();
const handeClick = (sortType) => onSort({sortType}) const handeClick = (sortType) => onSort({ sortType });
return ( return (
<> <>

@ -52,13 +52,14 @@ const handleListDelete = (list) => ({
}); });
const sortList = (id, data) => { const sortList = (id, data) => {
return ({ return {
type: EntryActionTypes.LIST_SORT, type: EntryActionTypes.LIST_SORT,
payload: { payload: {
id, id,
data data,
}, },
})}; };
};
const handleListSort = (list) => ({ const handleListSort = (list) => ({
type: EntryActionTypes.LIST_SORT_HANDLE, type: EntryActionTypes.LIST_SORT_HANDLE,
@ -67,7 +68,6 @@ const handleListSort = (list) => ({
}, },
}); });
export default { export default {
createListInCurrentBoard, createListInCurrentBoard,
handleListCreate, handleListCreate,

Loading…
Cancel
Save