4
0
forked from crowetic/commerce

Merge pull request #20 from marbiano/homepage-marquee-links

Marquee products links
This commit is contained in:
B 2020-10-27 01:26:12 -03:00 committed by GitHub
commit c8faf2352c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,8 +31,12 @@ const ProductCard: FC<Props> = ({
currencyCode: p.prices?.price?.currencyCode!, currencyCode: p.prices?.price?.currencyCode!,
}) })
if (variant === 'slim') {
return ( return (
<Link href={`/product${p.path}`}>
<a
className={cn(s.root, { [s.simple]: variant === 'simple' }, className)}
>
{variant === 'slim' ? (
<div className="relative overflow-hidden box-border"> <div className="relative overflow-hidden box-border">
<div className="absolute inset-0 flex items-center justify-end mr-8 z-20"> <div className="absolute inset-0 flex items-center justify-end mr-8 z-20">
<span className="bg-black text-white inline-block p-3 font-bold text-xl break-words"> <span className="bg-black text-white inline-block p-3 font-bold text-xl break-words">
@ -48,14 +52,8 @@ const ProductCard: FC<Props> = ({
quality="90" quality="90"
/> />
</div> </div>
) ) : (
} <>
return (
<Link href={`/product${p.path}`}>
<a
className={cn(s.root, { [s.simple]: variant === 'simple' }, className)}
>
<div className={s.squareBg} /> <div className={s.squareBg} />
<div className="flex flex-row justify-between box-border w-full z-20 absolute"> <div className="flex flex-row justify-between box-border w-full z-20 absolute">
<div className="absolute top-0 left-0 pr-16 max-w-full"> <div className="absolute top-0 left-0 pr-16 max-w-full">
@ -81,6 +79,8 @@ const ProductCard: FC<Props> = ({
quality="90" quality="90"
/> />
</div> </div>
</>
)}
</a> </a>
</Link> </Link>
) )