> ## Documentation Index
> Fetch the complete documentation index at: https://committ.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# useEventDetail

> Drives the verification modal with instance details, map embed, and penalties.

# 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)

***

## Modal Integration

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

| Field         | Type           | Purpose                                          |
| :------------ | :------------- | :----------------------------------------------- |
| instance      | ParsedInstance | Full instance data with parsed JSON fields       |
| parentTask    | ParsedTask     | Parent task metadata (if not orphaned)           |
| timeRemaining | string         | Human-readable countdown                         |
| canVerify     | boolean        | Whether the verification button should be active |
| onVerify      | function       | Navigates to the verification flow               |
| onDelete      | function       | Triggers instance deletion via Triple-Write      |
