MCPcopy Create free account
hub / github.com/MagicCube/agentara / CommitTimestamp

Function CommitTimestamp

web/src/components/ai-elements/commit.tsx:154–174  ·  view source on GitHub ↗
({
  date,
  className,
  children,
  ...props
}: CommitTimestampProps)

Source from the content-addressed store, hash-verified

152});
153
154export const CommitTimestamp = ({
155 date,
156 className,
157 children,
158 ...props
159}: CommitTimestampProps) => {
160 const formatted = relativeTimeFormat.format(
161 Math.round((date.getTime() - Date.now()) / (1000 * 60 * 60 * 24)),
162 "day"
163 );
164
165 return (
166 <time
167 className={cn("text-xs", className)}
168 dateTime={date.toISOString()}
169 {...props}
170 >
171 {children ?? formatted}
172 </time>
173 );
174};
175
176export type CommitActionsProps = HTMLAttributes<HTMLDivElement>;
177

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected