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
+28 -28
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,34 +54,33 @@ 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 </Link>
href={t.user.isFund ? `/fund/${t.user.username.replace('fund:', '')}` : `/profile/${t.user.username}`} <span className="shrink-0 font-medium tabular-nums">{formatCurrency(t.total)}</span>
className="text-slate-300 hover:text-white" </div>
> {/* Secondary row: user · time (left) shares @ price (right) */}
{t.user.displayUsername ?? t.user.username} <div className="flex items-center justify-between text-xs text-slate-500">
</Link> <div className="flex items-center gap-1.5 min-w-0">
<span className="text-slate-600">·</span> {t.user.isFund && <span className="text-indigo-400 shrink-0">🏦</span>}
<Link href={`/hashtag/${t.hashtag!.tag}`} className="text-indigo-300 hover:text-indigo-200"> <Link
#{t.hashtag!.displayTag} href={t.user.isFund ? `/fund/${t.user.username.replace('fund:', '')}` : `/profile/${t.user.username}`}
</Link> className="text-slate-400 hover:text-slate-200 truncate"
</div> >
<p className="text-xs text-slate-500 mt-0.5"> {t.user.displayUsername ?? t.user.username}
{formatDistanceToNow(t.createdAt, { addSuffix: true })} </Link>
</p> <span className="text-slate-700 shrink-0">·</span>
<span className="shrink-0">{formatDistanceToNow(t.createdAt, { addSuffix: true })}</span>
</div> </div>
<span className="shrink-0 tabular-nums ml-3">{formatNumber(t.shares)} sh @ {formatCurrency(t.price)}</span>
</div> </div>
<div className="text-right shrink-0"> {/* PnL: sell trades only */}
<p>{formatNumber(t.shares)} sh @ {formatCurrency(t.price)}</p> {(t.type === 'SELL_LONG' || t.type === 'SELL_SHORT') && (
<p className="text-xs text-slate-500">{formatCurrency(t.total)}</p> <div className={`text-xs text-right ${pnlColor(t.profit)}`}>{formatPnl(t.profit)}</div>
{(t.type === 'SELL_LONG' || t.type === 'SELL_SHORT') && ( )}
<p className={`text-xs ${pnlColor(t.profit)}`}>{formatPnl(t.profit)}</p>
)}
</div>
</div> </div>
))} ))}
</div> </div>