fix: reporter dashboard — guard reported_at null before new Date()
This commit is contained in:
@@ -95,11 +95,13 @@ export default async function ReporterPage() {
|
||||
{siteName ? ` · ${siteName}` : ''}
|
||||
{inc.severity ? ` · Severity ${inc.severity}` : ''}
|
||||
</p>
|
||||
{inc.reported_at && (
|
||||
<p className="text-xs text-gray-400 mt-0.5">
|
||||
{new Date(inc.reported_at as string).toLocaleDateString('en-MY', {
|
||||
day: 'numeric', month: 'short', year: 'numeric',
|
||||
})}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<span className={`text-xs rounded-full px-2 py-0.5 shrink-0 ${STATUS_COLORS[inc.status] ?? 'bg-gray-100 text-gray-600'}`}>
|
||||
{STATUS_LABELS[inc.status] ?? inc.status}
|
||||
|
||||
Reference in New Issue
Block a user