import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import { Comment, Icon, Loader, Visibility } from 'semantic-ui-react'; import { ActionTypes } from '../../../constants/Enums'; import AddComment from './AddComment'; import Item from './Item'; import styles from './Actions.module.css'; const Actions = React.memo( ({ items, isFetching, isAllFetched, isEditable, onFetch, onCommentCreate, onCommentUpdate, onCommentDelete, }) => { const [t] = useTranslation(); const handleCommentUpdate = useCallback( (id, data) => { onCommentUpdate(id, data); }, [onCommentUpdate], ); const handleCommentDelete = useCallback( (id) => { onCommentDelete(id); }, [onCommentDelete], ); return ( <>