We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51cc33c commit d1a9aa4Copy full SHA for d1a9aa4
apps/desktop/src/components/main/sidebar/profile/index.tsx
@@ -242,7 +242,7 @@ function ProfileButton({
242
onClick: () => void;
243
}) {
244
const auth = useAuth();
245
- const name = useMyName();
+ const name = useMyName(auth?.session?.user.email);
246
247
const profile = useQuery({
248
queryKey: ["profile"],
@@ -298,8 +298,8 @@ function ProfileButton({
298
);
299
}
300
301
-function useMyName() {
+function useMyName(email?: string) {
302
const userId = main.UI.useValue("user_id", main.STORE_ID);
303
const name = main.UI.useCell("humans", userId ?? "", "name", main.STORE_ID);
304
- return name || "Unknown";
+ return name || email || "Unknown";
305
0 commit comments