4
0
forked from crowetic/commerce

Image Pass

This commit is contained in:
Belen Curcio 2020-10-25 13:29:52 -03:00
parent 273569675c
commit 002885090d
3 changed files with 12 additions and 5 deletions

View File

@ -40,8 +40,8 @@ const DropdownMenu: FC<DropdownMenuProps> = ({ open = false }) => {
> >
<Menu.Items className={s.dropdownMenu}> <Menu.Items className={s.dropdownMenu}>
{LINKS.map(({ name, href }) => ( {LINKS.map(({ name, href }) => (
<Link href={href}> <Link href={href} key={href}>
<Menu.Item key={href}> <Menu.Item>
{({ active }) => ( {({ active }) => (
<a className={cn(s.link, { [s.active]: active })}>{name}</a> <a className={cn(s.link, { [s.active]: active })}>{name}</a>
)} )}

View File

@ -24,7 +24,7 @@ const ProductCard: FC<Props> = ({
imgHeight, imgHeight,
priority, priority,
}) => { }) => {
const src = p.images.edges?.[0]?.node.urlOriginal! const src = p.images.edges?.[0]?.node.urlLarge!
if (variant === 'slim') { if (variant === 'slim') {
return ( return (
@ -35,7 +35,7 @@ const ProductCard: FC<Props> = ({
</span> </span>
</div> </div>
<EnhancedImage <EnhancedImage
src={src} src={p.images.edges?.[0]?.node.urlSmall!}
alt={p.name} alt={p.name}
width={imgWidth} width={imgWidth}
height={imgHeight} height={imgHeight}

View File

@ -3,7 +3,14 @@ module.exports = {
removeDeprecatedGapUtilities: true, removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true, purgeLayersByDefault: true,
}, },
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], purge: {
preserveHtmlElements: false,
mode: 'all',
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
],
},
theme: { theme: {
extend: { extend: {
maxWidth: { maxWidth: {