fix: cast Supabase join types through unknown for TSC compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
This commit is contained in:
2026-07-11 07:57:00 +08:00
co-authored by Claude Sonnet 4.6
parent 7d3f8ec757
commit 33875395fb
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ export async function sendNewIncidentEmail(
.eq('id', incidentId)
.single()
const siteName = (incident?.sites as { name: string } | null)?.name ?? 'Unknown Site'
const reporterName = (incident?.reporter as { name: string } | null)?.name ?? 'Unknown'
const siteName = (incident?.sites as unknown as { name: string } | null)?.name ?? 'Unknown Site'
const reporterName = (incident?.reporter as unknown as { name: string } | null)?.name ?? 'Unknown'
const reportedAt = incident?.reported_at
? new Date(incident.reported_at).toLocaleString('en-MY', { timeZone: 'Asia/Kuala_Lumpur' })
: '-'