more mobile fixes
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m21s

This commit is contained in:
2026-03-19 01:41:31 -04:00
parent 1475c17a9c
commit da568646e2
+21 -21
View File
@@ -42,8 +42,9 @@ export default async function GlobalTradesPage({ searchParams }: PageProps) {
<div className="bg-surface-card border border-surface-border rounded-xl overflow-hidden"> <div className="bg-surface-card border border-surface-border rounded-xl overflow-hidden">
<div className="divide-y divide-surface-border"> <div className="divide-y divide-surface-border">
{trades.map((t) => ( {trades.map((t) => (
<div key={t.id} className="flex items-center justify-between px-4 py-3 text-sm"> <div key={t.id} className="px-4 py-3 text-sm space-y-1.5">
<div className="flex items-center gap-3"> {/* Primary row: type badge · hashtag · total value */}
<div className="flex items-center gap-2">
<span <span
className={`text-xs font-medium px-2 py-0.5 rounded shrink-0 ${ className={`text-xs font-medium px-2 py-0.5 rounded shrink-0 ${
t.type.startsWith('BUY') t.type.startsWith('BUY')
@@ -53,35 +54,34 @@ export default async function GlobalTradesPage({ searchParams }: PageProps) {
> >
{t.type.replace('_', ' ')} {t.type.replace('_', ' ')}
</span> </span>
<div> <Link
<div className="flex items-center gap-1.5"> href={`/hashtag/${t.hashtag!.tag}`}
{t.user.isFund ? ( className="text-indigo-300 hover:text-indigo-200 font-medium truncate flex-1 min-w-0"
<span className="text-xs text-indigo-400">🏦</span> >
) : null} #{t.hashtag!.displayTag}
</Link>
<span className="shrink-0 font-medium tabular-nums">{formatCurrency(t.total)}</span>
</div>
{/* Secondary row: user · time (left) shares @ price (right) */}
<div className="flex items-center justify-between text-xs text-slate-500">
<div className="flex items-center gap-1.5 min-w-0">
{t.user.isFund && <span className="text-indigo-400 shrink-0">🏦</span>}
<Link <Link
href={t.user.isFund ? `/fund/${t.user.username.replace('fund:', '')}` : `/profile/${t.user.username}`} href={t.user.isFund ? `/fund/${t.user.username.replace('fund:', '')}` : `/profile/${t.user.username}`}
className="text-slate-300 hover:text-white" className="text-slate-400 hover:text-slate-200 truncate"
> >
{t.user.displayUsername ?? t.user.username} {t.user.displayUsername ?? t.user.username}
</Link> </Link>
<span className="text-slate-600">·</span> <span className="text-slate-700 shrink-0">·</span>
<Link href={`/hashtag/${t.hashtag!.tag}`} className="text-indigo-300 hover:text-indigo-200"> <span className="shrink-0">{formatDistanceToNow(t.createdAt, { addSuffix: true })}</span>
#{t.hashtag!.displayTag}
</Link>
</div> </div>
<p className="text-xs text-slate-500 mt-0.5"> <span className="shrink-0 tabular-nums ml-3">{formatNumber(t.shares)} sh @ {formatCurrency(t.price)}</span>
{formatDistanceToNow(t.createdAt, { addSuffix: true })}
</p>
</div> </div>
</div> {/* PnL: sell trades only */}
<div className="text-right shrink-0">
<p>{formatNumber(t.shares)} sh @ {formatCurrency(t.price)}</p>
<p className="text-xs text-slate-500">{formatCurrency(t.total)}</p>
{(t.type === 'SELL_LONG' || t.type === 'SELL_SHORT') && ( {(t.type === 'SELL_LONG' || t.type === 'SELL_SHORT') && (
<p className={`text-xs ${pnlColor(t.profit)}`}>{formatPnl(t.profit)}</p> <div className={`text-xs text-right ${pnlColor(t.profit)}`}>{formatPnl(t.profit)}</div>
)} )}
</div> </div>
</div>
))} ))}
</div> </div>
</div> </div>