({ position: p, dimmed }: { position: TraderPosition; dimmed?: boolean })
| 186 | } |
| 187 | |
| 188 | function PositionRow({ position: p, dimmed }: { position: TraderPosition; dimmed?: boolean }) { |
| 189 | return ( |
| 190 | <div |
| 191 | className="smart-money-row px-2 py-1 flex items-center gap-2 tabular-nums" |
| 192 | style={{ opacity: dimmed ? 0.5 : 1 }} |
| 193 | > |
| 194 | <div className="flex-1 min-w-0 truncate text-[var(--text)]" title={p.title}> |
| 195 | {p.title || truncAddr(p.conditionId)} |
| 196 | </div> |
| 197 | <span className="text-[var(--text-dim)] w-[28px] text-right shrink-0">{p.outcome}</span> |
| 198 | <span className="text-[var(--text)] w-[48px] text-right shrink-0">{formatVolume(p.currentValue)}</span> |
| 199 | <span |
| 200 | className="w-[52px] text-right shrink-0" |
| 201 | style={{ color: p.cashPnl >= 0 ? "#22c55e" : "#ff4444" }} |
| 202 | > |
| 203 | {p.cashPnl >= 0 ? "+" : ""}{formatVolume(p.cashPnl)} |
| 204 | </span> |
| 205 | </div> |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | function ActivityRow({ activity: a }: { activity: TraderActivity }) { |
| 210 | const typeBadgeColors: Record<string, string> = { |
nothing calls this directly
no test coverage detected