Skip to main content

useEventDetail

The useEventDetail hook (hooks/modal/useEventDetail.ts) is the data layer for the EventDetailModal. At ~480 lines, it is one of the most complex hooks in the application.

Responsibilities

  1. Fetches the full instance details from SQLite by selectedEventId
  2. Parses JSON columns (conditions, penalties, waivers, checkpoints)
  3. Resolves the parent task for display metadata
  4. Computes verification status and time remaining
  5. Provides action handlers (verify, skip, delete instance)

The hook returns a structured object that the EventDetailModal consumes directly: