Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions client/modules/User/components/CollectionItemRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import { removeFromCollection } from '../../IDE/actions/collections';
import { formatDateToString } from '../../../utils/formatDate';
import RemoveIcon from '../../../images/close.svg';
import { TableDropdown } from '../../../components/Dropdown/TableDropdown';
import { MenuItem } from '../../../components/Dropdown/MenuItem';

const CollectionItemRow = ({ collection, item, isOwner }) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -48,13 +49,11 @@ const CollectionItemRow = ({ collection, item, isOwner }) => {
<td>{sketchOwnerUsername}</td>
<td className="collection-row__action-column">
{isOwner && (
<button
className="collection-row__remove-button"
onClick={handleSketchRemove}
aria-label={t('Collection.SketchRemoveARIA')}
>
<RemoveIcon focusable="false" aria-hidden="true" />
</button>
<TableDropdown aria-label={t('Collection.SketchRemoveARIA')}>
<MenuItem onClick={handleSketchRemove}>
{t('Collection.RemoveFromCollection')}
</MenuItem>
</TableDropdown>
)}
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions translations/locales/bn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@
"DescriptionPlaceholder": "বর্ণনা যোগ করুন",
"NumSketches": "{{count}} স্কেচ",
"By": "সংগ্রহ করেছেন ",
"RemoveFromCollection": "Remove from Collection",
"NoSketches": "সংগ্রহে কোন স্কেচ নেই",
"TableSummary": "সমস্ত সংগ্রহ ধারণ করা টেবিল",
"HeaderName": "নাম",
Expand Down
1 change: 1 addition & 0 deletions translations/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@
"NumSketches": "{{count}} sketch",
"NumSketches_plural": "{{count}} sketches",
"By": "Collection by ",
"RemoveFromCollection": "Remove from Collection",
"NoSketches": "No sketches in collection",
"TableSummary": "table containing all collections",
"HeaderName": "Name",
Expand Down
Loading