From a298686d6bbc7e3127124d42ed8912d464528db9 Mon Sep 17 00:00:00 2001
From: Gabe Cook
Date: Thu, 5 Jun 2025 22:06:38 -0500
Subject: [PATCH] fix: fallback to user email when username is unset (#237)
---
app/routes/machines/components/machine-row.tsx | 4 +++-
app/routes/machines/machine.tsx | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/routes/machines/components/machine-row.tsx b/app/routes/machines/components/machine-row.tsx
index de42c7d..285e7fb 100644
--- a/app/routes/machines/components/machine-row.tsx
+++ b/app/routes/machines/components/machine-row.tsx
@@ -63,7 +63,9 @@ export default function MachineRow({
>
{node.givenName}
- {node.user.name}
+
+ {node.user.name ?? node.user.email}
+
{mapTagsToComponents(node, uiTags)}
{node.validTags.map((tag) => (
diff --git a/app/routes/machines/machine.tsx b/app/routes/machines/machine.tsx
index 637d6be..ae3f892 100644
--- a/app/routes/machines/machine.tsx
+++ b/app/routes/machines/machine.tsx
@@ -109,7 +109,7 @@ export default function Page() {
- {node.user.name}
+ {node.user.name ?? node.user.email}
@@ -254,7 +254,7 @@ export default function Page() {
className="w-full max-w-full grid grid-cols-1 lg:grid-cols-2 gap-y-2 sm:gap-x-12"
>