tracks lexicons and how many times they appeared on the jetstream

fix(client): check if date is 'invalid' which means its old nanoseconds since too lazy to fix it in db

ptr.pet 8bbc0246 86a2eabe

verified
Changed files
+5 -1
client
src
lib
+5 -1
client/src/lib/format.ts
···
return num.toLocaleString();
};
+
const isValidDate = (d: Date) => d instanceof Date && !isNaN(d.getTime());
export const formatTimestamp = (timestamp: number): string => {
-
return new Date(timestamp * 1000).toLocaleString();
+
const date = new Date(timestamp * 1000);
+
return isValidDate(date)
+
? date.toLocaleString()
+
: new Date(timestamp / 1000).toLocaleString();
};