feat: PWA offline capture — IndexedDB queue, service worker cache, auto-sync on reconnect

This commit is contained in:
2026-07-11 19:07:35 +08:00
parent 8c88118b15
commit c048878600
7 changed files with 251 additions and 4 deletions
+2
View File
@@ -4,6 +4,7 @@ import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import { ReportForm } from '@/components/incidents/report-form'
import { LanguageSwitcher } from '@/components/language-switcher'
import { OfflineSync } from '@/components/incidents/offline-sync'
interface Props {
searchParams: Promise<{ zone?: string }>
@@ -47,6 +48,7 @@ export default async function ReportPage({ searchParams }: Props) {
)}
</div>
<ReportForm zoneToken={zone ?? null} zoneName={zoneName} siteName={siteName} />
<OfflineSync />
</main>
)
}