fix: review avatar uses authorId instead of displayName, show reviews for hidden products

This commit is contained in:
Kirill
2026-05-22 19:14:22 +05:00
parent a96944328d
commit 02c7d7ba36
4 changed files with 9 additions and 5 deletions
@@ -25,6 +25,7 @@ export type PublicReviewFeedItem = {
text: string | null
imageUrl: string | null
createdAt: string
authorId: string
authorDisplay: string
authorAvatar?: string | null
authorAvatarStyle?: string | null
@@ -53,6 +54,7 @@ export type PublicProductReviewItem = {
text: string | null
imageUrl: string | null
createdAt: string
authorId: string
authorDisplay: string
authorAvatar?: string | null
authorAvatarStyle?: string | null
@@ -20,7 +20,7 @@ function ReviewItem({ rv }: { rv: PublicProductReviewItem }) {
<Stack spacing={0.75}>
<Stack direction="row" spacing={1.5} sx={{ alignItems: 'center' }}>
<UserAvatar
userId={rv.authorDisplay}
userId={rv.authorId}
avatarUrl={rv.authorAvatar}
avatarStyle={rv.authorAvatarStyle}
size={32}
@@ -102,7 +102,7 @@ export function ReviewsBlock() {
)}
<Stack direction="row" spacing={1.5} sx={{ minWidth: { sm: 200 }, alignItems: 'center' }}>
<UserAvatar
userId={r.authorDisplay}
userId={r.authorId}
avatarUrl={r.authorAvatar}
avatarStyle={r.authorAvatarStyle}
size={40}