feat(F-056): completed feature

This commit is contained in:
chattie
2026-08-19 15:10:09 +02:00
parent cc84f24658
commit a967e49851
29 changed files with 946 additions and 43 deletions

View File

@@ -75,8 +75,12 @@ export default function CheckoutClient() {
notes: form.notes,
}),
});
if (res.status === 401) {
setError('Debes iniciar sesión para finalizar el pedido.');
return;
}
if (!res.ok) {
const data = await res.json();
const data = await res.json().catch(() => ({}));
throw new Error(data.error?.message || 'Error al procesar el pedido');
}
const { orderId } = await res.json();