dwindown
7e64fd4654
fix: Restore contextual header + add debugging
## Fixes:
1. **Contextual Header Restored** ✅
- Title back to string (not ReactNode)
- Header now shows properly
- Back button moved to action area
2. **Comprehensive Debugging Added** 🔍
- Log API fetch
- Log API response
- Log template data
- Log state changes (subject, body, variables)
- Will help identify why defaults not loading
## Changes:
```tsx
// Before: ReactNode title (broke header)
title={<div><BackButton /><span>Title</span></div>}
// After: String title (header works)
title={template?.event_label || "Edit Template"}
action={
<div>
<BackButton />
<ResetButton />
</div>
}
```
## Debug Logs:
- "Fetching template for:" eventId, channelId
- "API Response:" full response
- "Template changed:" template object
- "Template data:" destructured fields
- "Subject state:", "Body state:", "Variables state:"
Check browser console to see what is happening!
2025-11-13 00:23:13 +07:00
..
2025-11-04 11:19:00 +07:00
2025-11-13 00:23:13 +07:00
2025-11-05 18:54:41 +07:00
2025-11-04 11:19:00 +07:00
2025-11-12 18:53:20 +07:00
2025-11-12 18:53:20 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00