MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / TimeText

Function TimeText

dashboard/lcm/src/components.tsx:103–121  ·  view source on GitHub ↗
(props: { epoch: any; className?: string })

Source from the content-addressed store, hash-verified

101}
102
103export function TimeText(props: { epoch: any; className?: string }): React.ReactElement {
104 if (!props.epoch) {
105 return <span className={props.className || "hermes-lcm-dim"}>—</span>;
106 }
107 const absolute = fmtAbsoluteTime(props.epoch);
108 let dateTime = "";
109 try {
110 dateTime = new Date(Number(props.epoch) * 1000).toISOString();
111 } catch (e) { /* best-effort */ }
112 return (
113 <time
114 className={props.className || "hermes-lcm-dim"}
115 title={absolute}
116 dateTime={dateTime || undefined}
117 >
118 {fmtTime(props.epoch)}
119 </time>
120 );
121}
122
123export function CopyButton(props: { text: any; label?: string; title?: string }): React.ReactElement {
124 const [status, setStatus] = useState<"idle" | "copied" | "failed">("idle");

Callers

nothing calls this directly

Calls 2

fmtAbsoluteTimeFunction · 0.90
fmtTimeFunction · 0.90

Tested by

no test coverage detected