| @@ -18,7 +18,7 @@ export const IconButton = (props) => { | |||
| // disabled={disabled} | |||
| onClick={(event) => { | |||
| event.stopPropagation(); | |||
| if (!disabled) props.onClick(event); | |||
| if (!disabled && props?.onClick) props?.onClick(event); | |||
| }} | |||
| sx={props.style} | |||
| iconcolor={props.iconColor} | |||
| @@ -69,8 +69,9 @@ const UserReviews = (props) => { | |||
| console.log(props); | |||
| const lastThreeReviews = useMemo(() => { | |||
| console.log("profile Reviews", reviews); | |||
| if (props.givingReview) return [props.givingReview]; | |||
| if (props.isProfileReviews && Array.isArray(reviews) && !props.isAdmin) { | |||
| if (Array.isArray(reviews) && !props.isAdmin) { | |||
| return reviews.filter((singleReview) => { | |||
| let userWhoRecievedReview = | |||
| singleReview?.exchange?.buyer?.user?._id === singleReview?.user?._id | |||