fix: profile banner delay for orgs + small DX chore (#10546)
* Fixing profile banner delay for orgs * Separating into other useEffectpull/10569/merge
parent
f3eb490e3b
commit
49a61207d5
|
@ -923,11 +923,14 @@ const EventTypesPage = () => {
|
|||
if (searchParams?.get("openIntercom") === "true") {
|
||||
open();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setShowProfileBanner(
|
||||
!!orgBranding && !document.cookie.includes("calcom-profile-banner=1") && !user?.completedOnboarding
|
||||
);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}, [orgBranding, user]);
|
||||
|
||||
return (
|
||||
<ShellMain
|
||||
|
|
|
@ -132,7 +132,6 @@ function useRedirectToLoginIfUnauthenticated(isPublic = false) {
|
|||
}
|
||||
|
||||
function AppTop({ setBannersHeight }: { setBannersHeight: Dispatch<SetStateAction<number>> }) {
|
||||
const router = useRouter();
|
||||
const bannerRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
|
|
|
@ -5,7 +5,12 @@ import { sendOrganizationEmailVerification } from "@calcom/emails";
|
|||
import { hashPassword } from "@calcom/features/auth/lib/hashPassword";
|
||||
import { subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains";
|
||||
import { DEFAULT_SCHEDULE, getAvailabilityFromSchedule } from "@calcom/lib/availability";
|
||||
import { IS_CALCOM, IS_TEAM_BILLING_ENABLED, RESERVED_SUBDOMAINS } from "@calcom/lib/constants";
|
||||
import {
|
||||
IS_CALCOM,
|
||||
IS_TEAM_BILLING_ENABLED,
|
||||
RESERVED_SUBDOMAINS,
|
||||
IS_PRODUCTION,
|
||||
} from "@calcom/lib/constants";
|
||||
import { getTranslation } from "@calcom/lib/server/i18n";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { MembershipRole } from "@calcom/prisma/enums";
|
||||
|
@ -131,6 +136,7 @@ export const createHandler = async ({ input, ctx }: CreateOptions) => {
|
|||
|
||||
return { user: { ...createOwnerOrg, password } };
|
||||
} else {
|
||||
if (!IS_PRODUCTION) return { checked: true };
|
||||
const language = await getTranslation(input.language ?? "en", "common");
|
||||
|
||||
const secret = createHash("md5")
|
||||
|
|
Loading…
Reference in New Issue