-
Notifications
You must be signed in to change notification settings - Fork 84
MM2-1696 Fix: seller logo shrinking on PDP and design fixes for seller section #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: test
Are you sure you want to change the base?
Changes from 2 commits
cf766e9
54fc1d5
4a413ea
1963d32
eab2a67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,17 @@ import { StarRating } from "@/components/atoms" | |
| import { SellerAvatar } from "@/components/cells/SellerAvatar/SellerAvatar" | ||
| import { SellerProps } from "@/types/seller" | ||
| import { SellerReview } from "../SellerReview/SellerReview" | ||
| import { CollapseIcon } from "@/icons" | ||
| import LocalizedClientLink from "../LocalizedLink/LocalizedLink" | ||
|
|
||
| export const SellerInfo = ({ | ||
| seller, | ||
| header = false, | ||
| showArrow = false, | ||
| }: { | ||
| seller: SellerProps | ||
| header?: boolean | ||
| showArrow?: boolean | ||
| }) => { | ||
| const { photo, name, reviews } = seller | ||
|
|
||
|
|
@@ -24,26 +28,37 @@ export const SellerInfo = ({ | |
| : 0 | ||
|
|
||
| return ( | ||
| <div className="flex gap-4 w-full"> | ||
| <div className="relative h-12 w-12 overflow-hidden rounded-sm"> | ||
| <SellerAvatar photo={photo} size={56} alt={name} /> | ||
| </div> | ||
| <div className="w-[90%]"> | ||
| <h3 className="heading-sm text-primary">{name}</h3> | ||
| <div className="flex items-center gap-2 border-b pb-4"> | ||
| <StarRating starSize={16} rate={rating || 0} /> | ||
| <span className="text-md text-secondary">{reviewCount} reviews</span> | ||
| <div className="flex flex-col w-full"> | ||
| <div className="flex gap-4 w-full border-b pb-5 p-4 items-center"> | ||
| <div className="rounded-sm"> | ||
| <SellerAvatar photo={photo} size={56} alt={name} /> | ||
| </div> | ||
| <div className="mt-4"> | ||
| {!header && | ||
| reviews | ||
| ?.filter((rev) => rev !== null) | ||
| .slice(-3) | ||
| .map((review) => ( | ||
| <SellerReview key={review.id} review={review} /> | ||
| ))} | ||
| <div className="flex flex-col gap-1"> | ||
| <h3 className="heading-sm text-primary">{name}</h3> | ||
| <div className="flex items-center gap-2"> | ||
| <StarRating starSize={14} rate={rating || 0} /> | ||
| <span className="label-md text-secondary"> | ||
| {reviewCount} reviews | ||
| </span> | ||
| </div> | ||
| </div> | ||
| {showArrow && ( | ||
| <LocalizedClientLink className="ml-auto" href={`/sellers/${seller.handle}`}> | ||
|
||
| <CollapseIcon className="-rotate-90" /> | ||
| </LocalizedClientLink> | ||
| )} | ||
| </div> | ||
| {!header && ( | ||
| <div className="flex flex-col gap-5 p-4"> | ||
| <h3 className="heading-sm uppercase">Seller reviews</h3> | ||
| {reviews | ||
| ?.filter((rev) => rev !== null) | ||
| .slice(-3) | ||
| .map((review) => ( | ||
| <SellerReview key={review.id} review={review} /> | ||
| ))} | ||
| </div> | ||
| )} | ||
| </div> | ||
| ) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get rid of this import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed