ref: Creating popups with hook, fix translation keys passing

This commit is contained in:
Maksim Eltyshev
2023-01-24 18:53:13 +01:00
parent 0f50dbde92
commit 8a46a2e0b9
69 changed files with 309 additions and 332 deletions

View File

@@ -4,9 +4,10 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Draggable } from 'react-beautiful-dnd';
import { Button, Checkbox, Icon } from 'semantic-ui-react';
import { usePopup } from '../../../lib/popup';
import NameEdit from './NameEdit';
import ActionsPopup from './ActionsPopup';
import ActionsStep from './ActionsStep';
import styles from './Item.module.scss';
@@ -39,6 +40,8 @@ const Item = React.memo(
nameEdit.current.open();
}, []);
const ActionsPopup = usePopup(ActionsStep);
return (
<Draggable draggableId={id} index={index} isDragDisabled={!isPersisted || !canEdit}>
{({ innerRef, draggableProps, dragHandleProps }, { isDragging }) => {