Fix React key props in order and my-orders pages

This commit is contained in:
DanielS
2026-06-22 22:24:21 +02:00
parent f91499861e
commit 2403408b6c
2 changed files with 5 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ export default async function MyOrdersPage() {
<div className="flex flex-wrap gap-2">
{items.map((item, i) => (
<span
key={i}
key={item.product_id}
className="text-xs bg-white/5 border border-white/10 rounded-full px-3 py-1 text-slate-300"
>
{item.product_name}

View File

@@ -79,8 +79,8 @@ export default async function OrderSuccessPage({
<CardContent className="space-y-4">
{/* Produkte */}
<div className="space-y-3">
{items.map((item, i) => (
<div key={i} className="space-y-1">
{items.map((item) => (
<div key={item.product_id} className="space-y-1">
<div className="flex justify-between text-sm">
<span className="font-semibold text-white">{item.product_name}</span>
<span className="text-white">
@@ -90,8 +90,8 @@ export default async function OrderSuccessPage({
</span>
</span>
</div>
{item.selected_modules.map((mod, j) => (
<div key={j} className="flex justify-between text-xs pl-4 text-slate-400">
{item.selected_modules.map((mod) => (
<div key={mod.module_id} className="flex justify-between text-xs pl-4 text-slate-400">
<span>+ {mod.module_name}</span>
<span>{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(mod.price)}</span>
</div>