Files
kolaytercih/src/features/odeme/components/odeme-hata-olayi.tsx
bilalgursen 40aa7b9526 feat(olcum): odeme_hata {kod} olayı — başlatma, form ve sonuç hata dalları
Ödeme başlatma action'ının her hata dalı dal adı taşıyan bir kod döndürür;
istemci bunu odeme_hata {kod, urun} olarak atar. Bağlantı hatası, iyzico
formunun çizilememesi ve başarısız sonuç kartı da aynı olayla ölçülür.
Olayda kişisel veri yok (sipariş no, e-posta, iyzico mesajı gitmez).
rehber_kaydirma olay adı da birliğe eklendi (sonraki commit kullanır).
BACKLOG #7. Seri başlangıcı: bu commit'in canlıya çıktığı gün.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 02:01:10 +03:00

24 lines
658 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
// Başarısız ödeme sonuç kartının görüntülenmesini `odeme_hata` olarak ölçer.
// Sonuç kartı sunucu bileşeni; olay mount sonrası buradan atılır. Yalnız
// durum adı gider (sipariş no gitmez); yenileme sayıyı şişirmesin diye oturum
// başına durum başına bir kez.
import { useEffect } from "react";
import { olayBirKez } from "@/lib/analitik";
export function OdemeHataOlayi({
durum,
}: {
/** SiparisDurumu (`@/lib/odeme`): pending | failed | not_found */
durum: string;
}) {
useEffect(() => {
const kod = `sonuc_${durum}`;
olayBirKez("odeme_hata", { kod }, kod);
}, [durum]);
return null;
}