style: improve payment link UI in admin merchants page and make it clickable

This commit is contained in:
mstfyldz
2026-03-14 00:57:12 +03:00
parent 6f13e27a80
commit 2959c24a75

View File

@@ -309,19 +309,29 @@ export default function MerchantsPage() {
{/* Payment Link Section */}
<div className="p-4 bg-blue-50/30 rounded-2xl border border-blue-50 space-y-2">
<label className="text-[10px] font-black text-blue-600 uppercase tracking-widest">Ödeme Linki</label>
<div className="flex items-center gap-3">
<div className="flex-1 bg-white px-4 py-2 rounded-xl text-[11px] font-mono text-gray-400 truncate border border-blue-100/30">
{paymentLink}
<label className="text-[10px] font-black text-blue-600 uppercase tracking-widest pl-1">Ödeme Linki</label>
<div className="flex items-center gap-2">
<div className="flex-1 bg-white px-4 py-3 rounded-xl border border-blue-100/50 flex items-center justify-between group/link hover:border-blue-200 transition-colors">
<a
href={paymentLink}
target="_blank"
rel="noreferrer"
className="text-[11px] font-mono truncate text-gray-500 hover:text-blue-600 transition-colors flex-1 flex items-center gap-1.5"
title="Linki Aç"
>
{typeof window !== 'undefined' ? window.location.origin : 'https://p2cgateway.store'}/checkout?merchant_id=<span className="text-blue-600 font-bold">{identifier}</span>&amount=<span className="text-emerald-500 font-bold">0</span>
<ExternalLink size={10} className="opacity-0 group-hover/link:opacity-100 transition-opacity" />
</a>
</div>
<button
onClick={() => copyToClipboard(paymentLink, m.id)}
className="p-2 bg-white text-blue-600 rounded-xl border border-blue-100 hover:bg-blue-600 hover:text-white transition shadow-sm shrink-0"
className="p-3 bg-white text-blue-600 rounded-xl border border-blue-100 hover:bg-blue-600 hover:text-white transition shadow-sm shrink-0"
title="Kopyala"
>
{copiedId === m.id ? <Check size={16} /> : <Copy size={16} />}
</button>
</div>
<p className="text-[10px] text-gray-400 font-medium">Bu linki tutar ve referans ekleyerek değiştirebilirsiniz.</p>
<p className="text-[9px] text-gray-400 font-medium px-1">Yukarıdaki linki müşterinize ileterek manuel ödeme alabilir veya sitenize gömebilirsiniz.</p>
</div>
</div>