diff --git a/components/Shell.tsx b/components/Shell.tsx index fa6f558e..adefd918 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -100,7 +100,7 @@ export function ShellSubHeading(props: { return (
-

+

{props.title}

{props.subtitle &&

{props.subtitle}

} @@ -171,7 +171,7 @@ export default function Shell(props: { if (i18n.status === "loading" || isRedirectingToOnboarding || loading) { // show spinner whilst i18n is loading to avoid language flicker return ( -
+
); @@ -225,7 +225,7 @@ export default function Shell(props: { ))}
-
+
@@ -309,20 +309,24 @@ function UserDropdown({ small }: { small?: boolean }) { const query = useMeQuery(); const user = query.data; - return user ? ( + return (
{!small && ( <> - {user.name} - cal.com/{user.username} + + {user?.username || "Nameless User"} + + + {user?.username ? `cal.com/${user.username}` : "No public page"} + - - - {t("view_public_page")} - - + {user?.username && ( + + + {t("view_public_page")} + + + )} - ) : null; + ); } diff --git a/server/createContext.ts b/server/createContext.ts index d3357909..04b461d1 100644 --- a/server/createContext.ts +++ b/server/createContext.ts @@ -69,7 +69,7 @@ async function getUserFromSession({ return null; } const { email, username } = user; - if (!username || !email) { + if (!email) { return null; } const avatar = user.avatar || defaultAvatarSrc({ email });