Compare commits

7 Commits

Author SHA1 Message Date
DanielS
3eb72481ce Add key props to recent orders list rendering
Some checks failed
Staging Build / build (push) Failing after 26s
2026-06-22 22:25:21 +02:00
DanielS
2403408b6c Fix React key props in order and my-orders pages 2026-06-22 22:24:21 +02:00
DanielS
f91499861e fix: korrigiere workflow syntax
Some checks failed
Staging Build / build (push) Failing after 28s
2026-06-22 21:41:42 +02:00
DanielS
84ced5a170 remove unused build config
Some checks failed
Staging Build / build (push) Failing after 2s
2026-06-22 21:38:57 +02:00
DanielS
d7a45576b2 build server test
Some checks failed
Staging Build / build (push) Failing after 1m1s
2026-06-22 21:32:53 +02:00
DanielS
dedf1945ef correct build server config
Some checks failed
Staging Build / build (push) Failing after 24s
2026-06-22 21:27:06 +02:00
e6913c03f5 Merge pull request 'develop build server' (#1) from develop into staging
Some checks failed
Staging Build / build (push) Failing after 48s
Reviewed-on: #1
2026-06-22 21:24:09 +02:00
4 changed files with 13 additions and 7 deletions

View File

@@ -7,6 +7,9 @@ on:
jobs:
build:
runs-on: webserver
defaults:
run:
working-directory: shop
steps:
- name: Code auschecken
uses: actions/checkout@v4
@@ -15,4 +18,6 @@ jobs:
run: npm install
- name: Staging-Build generieren
run: npm run build -- --configuration=staging
env:
NODE_ENV: development
run: npm run build

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>

View File

@@ -40,7 +40,8 @@ export function AdminRecentOrders() {
const fetchOrders = async () => {
try {
const res = await fetch('/api/admin/recent-orders', { cache: 'no-store' })
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000';
const res = await fetch(`${baseUrl}/api/admin/recent-orders`, { cache: 'no-store' });
if (!res.ok) return
const { orders: fresh } = await res.json()