fix(funnel): navbar giriş butonu kullanıcıyı bulunduğu sayfaya döndürür
Navbar'daki "Giriş yap" callback vermiyordu; giris-karti.tsx callback'siz isteği "/"'a düşürdüğü için rehber ya da katalog okuyan ziyaretçi girişten sonra ana sayfada uyanıyordu. Yeni GirisLinki bileşeni usePathname ile bulunulan yolu callback yapıyor. Callback bilerek sabit bir hedef (ör. /listem) değil: buton her sayfada duruyor, sabit hedef bağlam kaybı olur; /listem?uret=1 yazılsaydı girişten dönüşte üretim kendiliğinden başlar, kullanıcının ayrı onayı olmadan 3 kredi yanardı. Sorgu dizesi taşınmıyor — sorgu okuyan kanca tüm navbar'ı Suspense zorunluluğuna sokardı. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import Link from "next/link";
|
||||
import { ClipboardList, Coins } from "lucide-react";
|
||||
import { getCurrentUser } from "@/lib/session";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ListemButonu } from "@/features/liste/components/listem-butonu";
|
||||
import { ListeSenkron } from "@/features/liste/components/liste-senkron";
|
||||
import { RybbitIdentify } from "@/components/rybbit-identify";
|
||||
import { GirisLinki } from "./giris-linki";
|
||||
import { SignOutButton } from "./sign-out-button";
|
||||
|
||||
/**
|
||||
@@ -32,12 +32,7 @@ export async function UserNav() {
|
||||
<RybbitIdentify kullaniciId={null} />
|
||||
<ListeSenkron userId={null} />
|
||||
<ListemButonu />
|
||||
<Button
|
||||
asChild
|
||||
className="h-9 cursor-pointer rounded-full bg-slate-900 px-3.5 text-sm font-medium text-white transition-colors duration-200 hover:bg-slate-700 sm:h-12 sm:px-7 sm:text-base"
|
||||
>
|
||||
<Link href="/giris">Giriş yap</Link>
|
||||
</Button>
|
||||
<GirisLinki />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user