Skip to content

Commit dea248a

Browse files
committed
use id from project obj
1 parent f955a20 commit dea248a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client/modules/User/components/CollectionItemRow.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ const CollectionItemRow = ({ collection, item, isOwner }) => {
1919
t('Collection.DeleteFromCollection', { name_sketch: name })
2020
)
2121
) {
22-
dispatch(removeFromCollection(collection.id, item.projectId));
22+
dispatch(removeFromCollection(collection.id, item.project.id));
2323
}
2424
};
2525

2626
const name = projectIsDeleted ? (
2727
<span>{t('Collection.SketchDeleted')}</span>
2828
) : (
29-
<Link to={`/${item.project.user.username}/sketches/${item.projectId}`}>
29+
<Link to={`/${item.project.user.username}/sketches/${item.project.id}`}>
3030
{item.project.name}
3131
</Link>
3232
);
@@ -64,7 +64,6 @@ CollectionItemRow.propTypes = {
6464
}).isRequired,
6565
item: PropTypes.shape({
6666
createdAt: PropTypes.string.isRequired,
67-
projectId: PropTypes.string.isRequired,
6867
isDeleted: PropTypes.bool.isRequired,
6968
project: PropTypes.shape({
7069
id: PropTypes.string.isRequired,

0 commit comments

Comments
 (0)