MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / ActivityRow

Function ActivityRow

src/components/TraderPanel.tsx:209–239  ·  view source on GitHub ↗
({ activity: a }: { activity: TraderActivity })

Source from the content-addressed store, hash-verified

207}
208
209function ActivityRow({ activity: a }: { activity: TraderActivity }) {
210 const typeBadgeColors: Record<string, string> = {
211 TRADE: "#3b82f6",
212 REDEEM: "#22c55e",
213 SPLIT: "#777",
214 MERGE: "#777",
215 };
216 const badgeColor = typeBadgeColors[a.type] || "#777";
217
218 return (
219 <div className="smart-money-row px-2 py-1 flex items-center gap-1.5 tabular-nums">
220 <span className="text-[var(--text-ghost)] w-[24px] shrink-0 text-right">{timeAgo(a.timestamp)}</span>
221 <span
222 className="text-[10px] px-1 rounded-sm shrink-0"
223 style={{ color: badgeColor, border: `1px solid ${badgeColor}40` }}
224 >
225 {a.type}
226 </span>
227 <div className="flex-1 min-w-0 truncate text-[var(--text)]" title={a.title}>
228 {a.title}
229 </div>
230 <span
231 className="text-[10px] shrink-0"
232 style={{ color: a.side === "BUY" ? "#22c55e" : "#ff4444" }}
233 >
234 {a.side}
235 </span>
236 <span className="text-[var(--text)] w-[48px] text-right shrink-0">{formatVolume(a.usdcSize)}</span>
237 </div>
238 );
239}

Callers

nothing calls this directly

Calls 2

formatVolumeFunction · 0.90
timeAgoFunction · 0.70

Tested by

no test coverage detected