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
+5 -1
+5 -1
client/src/lib/format.ts
··· 2 2 return num.toLocaleString(); 3 3 }; 4 4 5 + const isValidDate = (d: Date) => d instanceof Date && !isNaN(d.getTime()); 5 6 export const formatTimestamp = (timestamp: number): string => { 6 - return new Date(timestamp * 1000).toLocaleString(); 7 + const date = new Date(timestamp * 1000); 8 + return isValidDate(date) 9 + ? date.toLocaleString() 10 + : new Date(timestamp / 1000).toLocaleString(); 7 11 };