Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

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

Gabe Kangasd7523489bc1c
diff --git a/web/components/admin/UserTable.tsx b/web/components/admin/UserTable.tsx
index 3180e8acbc..8a6e54b41f 100644
--- a/web/components/admin/UserTable.tsx
+++ b/web/components/admin/UserTable.tsx
@@ -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');
}