Type fixes

This commit is contained in:
Luis Alvarez
2020-10-19 12:40:26 -05:00
parent a3e021ec79
commit 9309bff517
5 changed files with 24 additions and 27 deletions

View File

@@ -28,13 +28,13 @@ export default function Home({
return (
<div className="mt-3">
<Grid>
{featuredProducts.map((p: any) => (
<ProductCard key={p.id} {...p} />
{featuredProducts.map(({ node }) => (
<ProductCard key={node.path} product={node} />
))}
</Grid>
<Marquee variant="secondary">
{products.slice(0, 3).map((p: any) => (
<ProductCard key={p.id} {...p} variant="slim" />
{products.slice(0, 3).map(({ node }) => (
<ProductCard key={node.path} product={node} variant="slim" />
))}
</Marquee>
<Hero
@@ -48,13 +48,13 @@ export default function Home({
Natural."
/>
<Grid layout="B">
{products.slice(3, 6).map((p: any) => (
<ProductCard key={p.id} {...p} />
{products.slice(3, 6).map(({ node }) => (
<ProductCard key={node.path} product={node} />
))}
</Grid>
<Marquee>
{products.slice(0, 3).map((p: any) => (
<ProductCard key={p.id} {...p} variant="slim" />
{products.slice(0, 3).map(({ node }) => (
<ProductCard key={node.path} product={node} variant="slim" />
))}
</Marquee>
<div className="py-12 flex flex-row w-full px-12">
@@ -84,8 +84,8 @@ export default function Home({
</div>
<div className="flex-1">
<Grid layout="normal">
{products.map((p: any) => (
<ProductCard key={p.id} {...p} variant="simple" />
{products.map(({ node }) => (
<ProductCard key={node.path} product={node} variant="simple" />
))}
</Grid>
</div>