Skip to content

Commit f064ef2

Browse files
committed
fix(art): duplicate key
1 parent ba8076d commit f064ef2

File tree

4 files changed

+41
-53
lines changed

4 files changed

+41
-53
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"cross-env": "^7.0.3",
4444
"postcss": "^8.5.6",
4545
"tailwindcss": "^4.1.17",
46-
"tailwindcss-motion": "^1.1.1",
4746
"tw-animate-css": "^1.4.0",
4847
"typescript": "^5.9.3",
4948
"velite": "^0.3.0"

pnpm-lock.yaml

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/art/page.tsx

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -58,49 +58,51 @@ export default function ArtPage() {
5858

5959
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
6060
{allArtists.map((artist) =>
61-
artist.commissions.map((commission) => (
62-
<Link
63-
key={`${artist.slug}-${commission.slug}`}
64-
className="relative aspect-square w-full overflow-clip rounded-md border border-white/25 transition-all hover:scale-[101%] hover:shadow-xl"
65-
href={`/art/${artist.slug}/${commission.slug}`}
66-
>
67-
{/* Image */}
68-
{commission.images[0] && (
69-
<ViewTransition name={`${artist.slug}-${commission.slug}-img-0`}>
70-
<Image
71-
src={commission.images[0]}
72-
alt={commission.title}
73-
className="absolute inset-0 z-0 size-full object-cover object-top"
74-
/>
75-
</ViewTransition>
76-
)}
61+
artist.commissions
62+
.filter((v) => artist.slug !== refSheetArtist.slug && v.slug !== refSheet.slug)
63+
.map((commission) => (
64+
<Link
65+
key={`${artist.slug}-${commission.slug}`}
66+
className="relative aspect-square w-full overflow-clip rounded-md border border-white/25 transition-all hover:scale-[101%] hover:shadow-xl"
67+
href={`/art/${artist.slug}/${commission.slug}`}
68+
>
69+
{/* Image */}
70+
{commission.images[0] && (
71+
<ViewTransition name={`${artist.slug}-${commission.slug}-img-0`}>
72+
<Image
73+
src={commission.images[0]}
74+
alt={commission.title}
75+
className="absolute inset-0 z-0 size-full object-cover object-top"
76+
/>
77+
</ViewTransition>
78+
)}
7779

78-
{/* Gradient overlay */}
79-
<div className="absolute inset-0 z-10 bg-gradient-to-b from-transparent to-black/50" />
80+
{/* Gradient overlay */}
81+
<div className="absolute inset-0 z-10 bg-gradient-to-b from-transparent to-black/50" />
8082

81-
{/* Descriptions */}
82-
<div className="relative z-10 flex h-full flex-col justify-end gap-1 p-6">
83-
<div className="flex flex-row items-center gap-4">
84-
<h1 className="font-bold text-2xl">{commission.title}</h1>
85-
<MdArrowOutward className="size-6" />
86-
</div>
83+
{/* Descriptions */}
84+
<div className="relative z-10 flex h-full flex-col justify-end gap-1 p-6">
85+
<div className="flex flex-row items-center gap-4">
86+
<h1 className="font-bold text-2xl">{commission.title}</h1>
87+
<MdArrowOutward className="size-6" />
88+
</div>
8789

88-
{/* Artist name */}
89-
<div className="flex flex-row items-center gap-2">
90-
{artist.avatar && (
91-
<Image
92-
src={artist.avatar}
93-
alt={artist.name}
94-
width={24}
95-
height={24}
96-
className="h-6 w-6 rounded-md"
97-
/>
98-
)}
99-
<span className="opacity-75">By {artist.name}</span>
90+
{/* Artist name */}
91+
<div className="flex flex-row items-center gap-2">
92+
{artist.avatar && (
93+
<Image
94+
src={artist.avatar}
95+
alt={artist.name}
96+
width={24}
97+
height={24}
98+
className="h-6 w-6 rounded-md"
99+
/>
100+
)}
101+
<span className="opacity-75">By {artist.name}</span>
102+
</div>
100103
</div>
101-
</div>
102-
</Link>
103-
))
104+
</Link>
105+
))
104106
)}
105107
</div>
106108
</div>

src/app/globals.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import "tw-animate-css";
33

44
@plugin "@tailwindcss/typography";
5-
@plugin "tailwindcss-motion";
65

76
@custom-variant dark (&:is(.dark *));
87

0 commit comments

Comments
 (0)