feat: update modal and sighting components for improved layout and timestamp display

This commit is contained in:
2025-12-23 12:41:25 +00:00
parent 3b7487da09
commit 9394793669
5 changed files with 40 additions and 11 deletions

View File

@@ -5,7 +5,8 @@ export const formatNumberPlate = (plate: string) => {
return formattedPlate;
};
export const timeAgo = (timestampmili: number) => {
export const timeAgo = (timestampmili: number | null) => {
if (timestampmili === null) return "unknown";
const diffMs = Date.now() - new Date(timestampmili).getTime();
const diffMins = Math.floor(diffMs / 60000);
if (diffMins < 60) {