diff --git a/apps/dashboard/src/components/dashboard-user-button.tsx b/apps/dashboard/src/components/dashboard-user-button.tsx
index 3148d6c3a..4cc6382c7 100644
--- a/apps/dashboard/src/components/dashboard-user-button.tsx
+++ b/apps/dashboard/src/components/dashboard-user-button.tsx
@@ -44,8 +44,7 @@ function DashboardUserAvatar(props: {
}) {
const size = props.size ?? 34;
const user = props.user;
- const label = user?.displayName ?? user?.primaryEmail ?? "User";
- const initials = label.slice(0, 2).toUpperCase();
+ const initials = user == null ? null : (user.displayName ?? user.primaryEmail)?.slice(0, 2).toUpperCase();
return (
-
-
- {initials}
-
+
+ {initials == null ? (
+
+ ) : (
+
+ {initials}
+
+ )}
);
@@ -174,7 +177,11 @@ function DashboardUserButtonInner(props: DashboardUserButtonProps) {
text="Sign out"
variant="destructive"
onClick={async () => await user.signOut()}
- icon={}
+ icon={(
+
+
+
+ )}
/>
>
)}