|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(props); |
|
|
console.log(props); |
|
|
const lastThreeReviews = useMemo(() => { |
|
|
const lastThreeReviews = useMemo(() => { |
|
|
|
|
|
console.log("profile Reviews", reviews); |
|
|
if (props.givingReview) return [props.givingReview]; |
|
|
if (props.givingReview) return [props.givingReview]; |
|
|
if (props.isProfileReviews && Array.isArray(reviews) && !props.isAdmin) { |
|
|
|
|
|
|
|
|
if (Array.isArray(reviews) && !props.isAdmin) { |
|
|
return reviews.filter((singleReview) => { |
|
|
return reviews.filter((singleReview) => { |
|
|
let userWhoRecievedReview = |
|
|
let userWhoRecievedReview = |
|
|
singleReview?.exchange?.buyer?.user?._id === singleReview?.user?._id |
|
|
singleReview?.exchange?.buyer?.user?._id === singleReview?.user?._id |