fix: nameless in sidebar for orgs (#10318)

Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
Hariom Balharaandsean-brydon authored and GitHub committed 2023-07-24 10:25:55 +00:00
1 parent 80a1458538
commit 4e1e586541
17 files changed
+58 -56

No files matched your search

+4 -3
View File
@@ -13,7 +13,6 @@ import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
import UnconfirmedBookingBadge from "@calcom/features/bookings/UnconfirmedBookingBadge";
import ImpersonatingBanner from "@calcom/features/ee/impersonation/components/ImpersonatingBanner";
import { OrgUpgradeBanner } from "@calcom/features/ee/organizations/components/OrgUpgradeBanner";
import { useOrgBrandingValues } from "@calcom/features/ee/organizations/hooks";
import HelpMenuItem from "@calcom/features/ee/support/components/HelpMenuItem";
import { TeamsUpgradeBanner } from "@calcom/features/ee/teams/components";
import { useFlagMap } from "@calcom/features/flags/context/provider";
@@ -79,6 +78,7 @@ import {
} from "@calcom/ui/components/icon";
import { Discord } from "@calcom/ui/components/icon/Discord";
import { useOrgBranding } from "../ee/organizations/context/provider";
import FreshChatProvider from "../ee/support/lib/freshchat/FreshChatProvider";
import { NProgressNextRouter } from "./NProgressPageIndicator";
import { TeamInviteBadge } from "./TeamInviteBadge";
@@ -801,7 +801,8 @@ const getOrganizationUrl = (slug: string) =>
function SideBar({ bannersHeight, user }: SideBarProps) {
const { t, isLocaleReady } = useLocale();
const orgBranding = useOrgBrandingValues();
const orgBranding = useOrgBranding();
const isOrgBrandingDataFetched = orgBranding !== undefined;
const publicPageUrl = useMemo(() => {
if (!user?.organizationId) return `${process.env.NEXT_PUBLIC_WEBSITE_URL}/${user?.username}`;
@@ -839,7 +840,7 @@ function SideBar({ bannersHeight, user }: SideBarProps) {
className="desktop-transparent bg-muted border-muted fixed left-0 hidden h-full max-h-screen w-14 flex-col overflow-y-auto overflow-x-hidden border-r dark:bg-gradient-to-tr dark:from-[#2a2a2a] dark:to-[#1c1c1c] md:sticky md:flex lg:w-56 lg:px-3">
<div className="flex h-full flex-col justify-between py-3 lg:pt-4">
<header className="items-center justify-between md:hidden lg:flex">
{orgBranding ? (
{!isOrgBrandingDataFetched ? null : orgBranding ? (
<Link href="/event-types" className="px-1.5">
<div className="flex items-center gap-2 font-medium">
<Avatar