Keine Alerts.
+ return (
+
+
+ {(['30d', '90d', 'all'] as const).map((r) => (
+
+ ))}
+
+
+
+
+ new Date(v).toLocaleDateString('de-DE')} />
+ `${v}€`} domain={['dataMin', 'dataMax']} />
+ new Date(v).toLocaleString('de-DE')}
+ formatter={(v) => [`${v}€`, 'Preis']} />
+
+
+
+
+ )
+}
diff --git a/src/components/ProductActions.tsx b/src/components/ProductActions.tsx
new file mode 100644
index 0000000..7f7489e
--- /dev/null
+++ b/src/components/ProductActions.tsx
@@ -0,0 +1,19 @@
+'use client'
+
+export function ProductActions({ productId }: { productId: string }) {
+ async function refresh() {
+ const res = await fetch(`/api/products/${productId}/scrape`, { method: 'POST' })
+ if (res.ok) location.reload()
+ }
+ async function del() {
+ if (!confirm('Wirklich löschen?')) return
+ const res = await fetch(`/api/products/${productId}`, { method: 'DELETE' })
+ if (res.ok) location.href = '/'
+ }
+ return (
+