From dfe89cb232b89c61fe5792e571320bdae227b4cf Mon Sep 17 00:00:00 2001 From: Alvaro Bautista <67112345+alvrba@users.noreply.github.com> Date: Mon, 15 Aug 2022 10:46:06 +0200 Subject: [PATCH] fix: solve small errors --- src/components/item/header/ItemHeaderActions.js | 2 +- src/components/main/Item.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/item/header/ItemHeaderActions.js b/src/components/item/header/ItemHeaderActions.js index 3d9d681b8..2d25fbf9f 100644 --- a/src/components/item/header/ItemHeaderActions.js +++ b/src/components/item/header/ItemHeaderActions.js @@ -3,7 +3,7 @@ import IconButton from '@material-ui/core/IconButton'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import EditIcon from '@material-ui/icons/Edit'; -import { Record } from 'immutable'; +import { Map, Record } from 'immutable'; import InfoIcon from '@material-ui/icons/Info'; import Tooltip from '@material-ui/core/Tooltip'; import ForumIcon from '@material-ui/icons/Forum'; diff --git a/src/components/main/Item.js b/src/components/main/Item.js index a465d7b4a..691d41330 100644 --- a/src/components/main/Item.js +++ b/src/components/main/Item.js @@ -1,7 +1,6 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; -import { Record } from 'immutable'; import { Card as GraaspCard, Thumbnail } from '@graasp/ui'; import truncate from 'lodash.truncate'; import { makeStyles } from '@material-ui/core/styles'; @@ -109,7 +108,7 @@ const Item = ({ item, memberships }) => { }; Item.propTypes = { - item: PropTypes.instanceOf(Record).isRequiredshape({ + item: PropTypes.shape({ id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, description: PropTypes.string.isRequired, @@ -118,6 +117,7 @@ Item.propTypes = { extra: PropTypes.shape({ image: PropTypes.string.isRequired, }).isRequired, + toJS: PropTypes.func, }).isRequired, memberships: PropTypes.arrayOf(PropTypes.shape({})).isRequired, };