Skip to content

Commit

Permalink
Testing Image component in product grid to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
hernan-clich committed Feb 7, 2022
1 parent f83375b commit 279220e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/screens/ProductList/components/ProductCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Image from 'next/image';
import Link from 'next/link';
import PATHS from '~constants/paths';
import type { TProduct } from '~types/product';
Expand All @@ -15,7 +16,7 @@ function ProductCard({ product }: Props) {
<Styled.ProductCardLink>
<Styled.ProductCardContainer>
<div className="img">
<img src={imageUrl} alt={name} />
<Image src={imageUrl} alt={name} height={180} width={180} layout="fixed" />
</div>
<div className="text">
<p>{name}</p>
Expand Down
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
reactStrictMode: true
reactStrictMode: true,
images: {
domains: ['firebasestorage.googleapis.com']
}
};

1 comment on commit 279220e

@vercel
Copy link

@vercel vercel bot commented on 279220e Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.