fix(wizard): clear basket items and configuration states after order completion

This commit is contained in:
DanielS
2026-08-11 23:10:47 +02:00
parent 2f32d80e9e
commit 982897a808

View File

@@ -796,6 +796,14 @@ export function OrderWizard({
const result = await res.json()
if (result.error) throw new Error(result.error)
// Warenkorb & Konfigurations-State vollständig leeren
setBasketItems([])
setEditingIdx(null)
setDeviceName('')
setLicenseNumber('')
setOrderNotes('')
setModuleQuantities({})
const firstOrderId = result.orders?.[0]?.id
if (firstOrderId) {
router.push(`/order/success?id=${firstOrderId}`)