refactor: odeme feature'ı + son süpürme — geçiş tamamlandı (Faz 10)
Some checks failed
Deploy / deploy (push) Failing after 3m46s
Some checks failed
Deploy / deploy (push) Failing after 3m46s
- paket/actions.ts → odeme-actions.ts; satin-al-form + rapor-yok-cta features/odeme/components/ altına; odeme-queries.ts (siparisGetir) - Yeni async OdemeSonucKarti: verifySession + sahiplik kontrolü + self-healing odemeyiSonuclandir çağrısı akıştaki yerinde (artık Suspense altındaki feature bileşeninde, aynı render semantiği); başarı/hata kartları içeride - Yeni async PaketSatinAl: paket + top-up kartları, getCurrentUser okuması içeride; statik hero/dipnot sayfada kaldı - İki sayfa senkron searchParams.then(); paket hata uyarısı sayfada çözülmüş JSX (hata yokken hiçbir şey çizilmediği için fallback bilerek null); paket/loading.tsx + odeme/sonuc/loading.tsx silindi - Süpürme doğrulandı: app/ altında route-dışı bileşen dosyası kalmadı; eski yol grep'leri sıfır; 7 *-queries server-only, 3 *-actions 'use server'; async sayfa sıfır; /api/odeme/callback el değmedi - Davranış değişikliği yok Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
36
src/features/odeme/components/rapor-yok-cta.tsx
Normal file
36
src/features/odeme/components/rapor-yok-cta.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useTercihProfili } from "@/features/liste/hooks/use-tercih-profili";
|
||||
import { sonucHref } from "@/features/sihirbaz/sihirbaz-sabitler";
|
||||
|
||||
/**
|
||||
* Ödeme başarılı ama henüz Yapay Zeka listesi yokken gösterilen CTA: kayıtlı tercih
|
||||
* profili olan adayı sihirbazı açık hâlde sonuç sayfasına götürür ve
|
||||
* "sıralamanı gir" metni gösterilmez; profil yoksa ana sayfadaki sıralama
|
||||
* formuna yönlendirir.
|
||||
*/
|
||||
export function RaporYokCta() {
|
||||
const profil = useTercihProfili();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
asChild
|
||||
className="h-11 cursor-pointer bg-orange-500 text-white transition-colors duration-200 hover:bg-orange-600"
|
||||
>
|
||||
<Link href={profil ? sonucHref(profil, { sihirbaz: "1" }) : "/"}>
|
||||
24'lük listeni oluştur
|
||||
<ArrowRight className="size-4" aria-hidden />
|
||||
</Link>
|
||||
</Button>
|
||||
<p className="text-center text-xs text-slate-500">
|
||||
{profil
|
||||
? "Sıralaman kayıtlı — sonuç sayfasındaki sihirbazla listeni kur."
|
||||
: "Sıralamanı girip sonuç sayfasındaki sihirbazla listeni kur."}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user