Skip to content

Commit 08e7e9f

Browse files
committed
feat: make Escrow ID prominent with copy button on create success page
1 parent 0023ce7 commit 08e7e9f

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/app/escrow/create/page.tsx

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,30 @@ export default function CreateEscrowPage() {
299299
</div>
300300

301301
<div className="p-6 space-y-6">
302+
{/* Escrow ID — prominent, first thing shown */}
303+
<div className="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4">
304+
<div className="flex items-start gap-2">
305+
<span className="text-blue-600 text-lg">🔑</span>
306+
<div className="flex-1">
307+
<h3 className="font-semibold text-blue-900 dark:text-blue-300">Escrow ID</h3>
308+
<p className="text-xs text-blue-700 dark:text-blue-400 mb-2">
309+
Save this ID — you&apos;ll need it to manage your escrow.
310+
</p>
311+
<div className="flex items-center gap-2">
312+
<code className="flex-1 bg-white dark:bg-gray-900 border border-blue-300 dark:border-blue-700 rounded px-3 py-2 text-sm break-all text-gray-900 dark:text-white">
313+
{createdEscrow.id}
314+
</code>
315+
<button
316+
onClick={() => copyToClipboard(createdEscrow.id, 'escrow_id')}
317+
className="flex-shrink-0 px-3 py-2 bg-blue-600 text-white text-xs font-medium rounded hover:bg-blue-700 transition-colors"
318+
>
319+
{copiedField === 'escrow_id' ? 'Copied!' : 'Copy'}
320+
</button>
321+
</div>
322+
</div>
323+
</div>
324+
</div>
325+
302326
{/* Escrow deposit address */}
303327
<div>
304328
<h3 className="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">
@@ -427,10 +451,6 @@ export default function CreateEscrowPage() {
427451
{new Date(createdEscrow.expires_at).toLocaleString()}
428452
</span>
429453
</div>
430-
<div>
431-
<span className="text-gray-500 dark:text-gray-400">Escrow ID:</span>
432-
<code className="ml-2 text-gray-900 dark:text-white">{createdEscrow.id}</code>
433-
</div>
434454
{createdEscrow.fee_amount && (
435455
<div>
436456
<span className="text-gray-500 dark:text-gray-400">Platform Fee:</span>

0 commit comments

Comments
 (0)