mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-20 11:03:08 +00:00
fix: Address code review comments
This commit is contained in:
@@ -47,7 +47,9 @@ interface ViewCommitsDialogProps {
|
||||
}
|
||||
|
||||
function formatRelativeDate(dateStr: string): string {
|
||||
if (!dateStr) return 'unknown date';
|
||||
const date = new Date(dateStr);
|
||||
if (isNaN(date.getTime())) return 'unknown date';
|
||||
const now = new Date();
|
||||
const diffMs = now.getTime() - date.getTime();
|
||||
const diffSecs = Math.floor(diffMs / 1000);
|
||||
|
||||
Reference in New Issue
Block a user