mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 16:07:01 +00:00
fix keys warning
This commit is contained in:
parent
3e510b1469
commit
1d156e6e64
@ -6,8 +6,8 @@ import Link from 'next/link';
|
|||||||
export default function ProductGridItems({ products }: { products: Product[] }) {
|
export default function ProductGridItems({ products }: { products: Product[] }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{products.map((product) => (
|
{products.map((product, index) => (
|
||||||
<Grid.Item key={product.handle} className="animate-fadeIn">
|
<Grid.Item key={`${product.handle}-${index}`} className="animate-fadeIn">
|
||||||
<Link className="relative inline-block h-full w-full" href={`/product/${product.handle}`}>
|
<Link className="relative inline-block h-full w-full" href={`/product/${product.handle}`}>
|
||||||
<GridTileImage
|
<GridTileImage
|
||||||
alt={product.title}
|
alt={product.title}
|
||||||
|
@ -34,8 +34,8 @@ export default async function StoriesDetail({
|
|||||||
'flex flex-col space-y-6 md:space-y-px'
|
'flex flex-col space-y-6 md:space-y-px'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{blog?.articles?.map((article) => (
|
{blog?.articles?.map((article, index) => (
|
||||||
<Link href={`/stories/${article.handle}`}>
|
<Link href={`/stories/${article.handle}`} key={`${article.handle}-${index}`}>
|
||||||
<div className="flex flex-col space-y-2 bg-white text-black md:col-span-1 md:flex-row md:space-x-2 md:space-y-0">
|
<div className="flex flex-col space-y-2 bg-white text-black md:col-span-1 md:flex-row md:space-x-2 md:space-y-0">
|
||||||
<div className="relative aspect-[4/3] min-w-full overflow-hidden md:min-w-[480px]">
|
<div className="relative aspect-[4/3] min-w-full overflow-hidden md:min-w-[480px]">
|
||||||
{!!article?.image?.url && (
|
{!!article?.image?.url && (
|
||||||
|
@ -33,8 +33,8 @@ export default async function Stories({
|
|||||||
'grid grid-cols-1 gap-y-24 md:grid-cols-3 md:gap-x-4'
|
'grid grid-cols-1 gap-y-24 md:grid-cols-3 md:gap-x-4'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{blog?.articles?.map((article) => (
|
{blog?.articles?.map((article, index) => (
|
||||||
<Link href={`/stories/${article.handle}`}>
|
<Link href={`/stories/${article.handle}`} key={`${article.handle}-${index}`}>
|
||||||
<div className="flex flex-col space-y-4 md:col-span-1">
|
<div className="flex flex-col space-y-4 md:col-span-1">
|
||||||
<div className="relative aspect-square overflow-hidden md:max-w-sm">
|
<div className="relative aspect-square overflow-hidden md:max-w-sm">
|
||||||
{!!article?.image?.url && (
|
{!!article?.image?.url && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user