MCPcopy Create free account
hub / github.com/dailydotdev/apps / generateEvent

Function generateEvent

packages/shared/src/hooks/log/useLogContextData.ts:33–45  ·  view source on GitHub ↗
(
  event: LogEvent,
  sharedPropsRef: MutableRefObject<Partial<LogEvent>>,
  page: string,
  now = new Date(),
)

Source from the content-addressed store, hash-verified

31});
32
33const generateEvent = (
34 event: LogEvent,
35 sharedPropsRef: MutableRefObject<Partial<LogEvent>>,
36 page: string,
37 now = new Date(),
38): LogEvent => ({
39 ...sharedPropsRef.current,
40 ...getGlobalSharedProps(),
41 event_timestamp: now,
42 event_id: generateLogEventId(now),
43 event_page: page,
44 ...event,
45});
46
47export default function useLogContextData(
48 pushToQueue: PushToQueueFunc,

Callers 2

logEventFunction · 0.85
logEventStartFunction · 0.85

Calls 2

generateLogEventIdFunction · 0.90
getGlobalSharedPropsFunction · 0.85

Tested by

no test coverage detected