From e631d04abaa4fb19aad11ed3d9e675284ba8270f Mon Sep 17 00:00:00 2001
From: weeihan
Date: Sat, 11 Jul 2026 18:41:43 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20reporter=20dashboard=20=E2=80=94=20guard?=
=?UTF-8?q?=20reported=5Fat=20null=20before=20new=20Date()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/(protected)/reporter/page.tsx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/app/(protected)/reporter/page.tsx b/app/(protected)/reporter/page.tsx
index eb11791..d7a2e9b 100644
--- a/app/(protected)/reporter/page.tsx
+++ b/app/(protected)/reporter/page.tsx
@@ -95,11 +95,13 @@ export default async function ReporterPage() {
{siteName ? ` · ${siteName}` : ''}
{inc.severity ? ` · Severity ${inc.severity}` : ''}
-
- {new Date(inc.reported_at as string).toLocaleDateString('en-MY', {
- day: 'numeric', month: 'short', year: 'numeric',
- })}
-
+ {inc.reported_at && (
+
+ {new Date(inc.reported_at as string).toLocaleDateString('en-MY', {
+ day: 'numeric', month: 'short', year: 'numeric',
+ })}
+
+ )}
{STATUS_LABELS[inc.status] ?? inc.status}