fix zIndex and key

This commit is contained in:
Julián Benegas 2020-10-23 19:04:12 -03:00
parent 6342eb21b8
commit 99ecf498fb
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ const ProductCard: FC<Props> = ({
className={cn(s.root, { [s.simple]: variant === 'simple' }, className)}
>
<div className={s.squareBg} />
<div className="flex flex-row justify-between box-border w-full z-10 absolute">
<div className="flex flex-row justify-between box-border w-full z-20 absolute">
<div className="absolute top-0 left-0">
<h3 className={s.productTitle}>
<span>{p.name}</span>

View File

@ -98,12 +98,12 @@ const ProductView: FC<Props> = ({ product, className }) => {
<div className="pb-4" key={opt.displayName}>
<h2 className="uppercase font-medium">{opt.displayName}</h2>
<div className="flex flex-row py-4">
{opt.values.map((v: any) => {
{opt.values.map((v: any, i: number) => {
const active = choices[opt.displayName]
return (
<Swatch
key={v.entityId}
key={`${v.entityId}-${i}`}
active={v.label === active}
variant={opt.displayName}
color={v.hexColors ? v.hexColors[0] : ''}