Browse Source

fix(admin): display year for user tables if not current year. Closes #3175

pull/3182/head
Gabe Kangas 3 years ago
parent
commit
d43c2be44a
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 5
      web/components/admin/UserTable.tsx

5
web/components/admin/UserTable.tsx

@ -7,6 +7,11 @@ import { UserPopover } from './UserPopover'; @@ -7,6 +7,11 @@ import { UserPopover } from './UserPopover';
import { BanUserButton } from './BanUserButton';
export function formatDisplayDate(date: string | Date) {
const d = new Date(date);
if (d.getFullYear() !== new Date().getFullYear()) {
return format(new Date(date), 'MMM d, yyyy H:mma');
}
return format(new Date(date), 'MMM d H:mma');
}

Loading…
Cancel
Save