Skip to content

Commit

Permalink
Merge branch 'main' into bump-atoms-1.0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
baileypumfleet committed Apr 15, 2024
2 parents 47af1af + a788e07 commit 00abd64
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
5 changes: 4 additions & 1 deletion apps/web/lib/team/[slug]/getServerSideProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ function getTeamWithoutMetadata<T extends Pick<Team, "metadata">>(team: T) {
const teamMetadata = teamMetadataSchema.parse(metadata);
return {
...rest,
requestedSlug: teamMetadata?.requestedSlug,
// add requestedSlug if available.
...(typeof teamMetadata?.requestedSlug !== "undefined"
? { requestedSlug: teamMetadata?.requestedSlug }
: {}),
};
}
4 changes: 2 additions & 2 deletions packages/emails/lib/sanitizeDisplayName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const sanitizeDisplayName = (nameAndEmail: string) => {
};

const sanitize = (name: string) => {
const charsToReplace = /[;,"<>()]/g;
const charsToReplace = /[;,"<>():]/g;

return name.replace(charsToReplace, " ");
return name.replace(charsToReplace, " ").replace(/\s+/g, " ");
};
28 changes: 16 additions & 12 deletions packages/features/bookings/Booker/Booker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,18 +247,6 @@ const BookerComponent = ({
<>
{event.data && !isPlatform ? <BookingPageTagManager eventType={event.data} /> : <></>}

{bookerState !== "booking" && event.data?.isInstantEvent && (
<div
className="animate-fade-in-up fixed bottom-2 z-40 my-2 opacity-0"
style={{ animationDelay: "1s" }}>
<InstantBooking
event={event.data}
onConnectNow={() => {
onConnectNowInstantMeeting();
}}
/>
</div>
)}
<div
className={classNames(
// In a popup embed, if someone clicks outside the main(having main class or main tag), it closes the embed
Expand Down Expand Up @@ -439,6 +427,22 @@ const BookerComponent = ({
setDayCount(null);
}}
/>

{bookerState !== "booking" && event.data?.isInstantEvent && (
<div
className={classNames(
"animate-fade-in-up z-40 my-2 opacity-0",
layout === BookerLayouts.MONTH_VIEW && isEmbed ? "" : "fixed bottom-2"
)}
style={{ animationDelay: "1s" }}>
<InstantBooking
event={event.data}
onConnectNow={() => {
onConnectNowInstantMeeting();
}}
/>
</div>
)}
{!hideBranding && !isPlatform && (
<m.span
key="logo"
Expand Down
7 changes: 3 additions & 4 deletions packages/features/shell/Shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import { useFormbricks } from "@calcom/lib/formbricks-client";
import getBrandColours from "@calcom/lib/getBrandColours";
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import useMediaQuery from "@calcom/lib/hooks/useMediaQuery";
import useTheme from "@calcom/lib/hooks/useTheme";
import { isKeyInObject } from "@calcom/lib/isKeyInObject";
import { localStorage } from "@calcom/lib/webstorage";
Expand Down Expand Up @@ -217,14 +216,14 @@ const Layout = (props: LayoutProps) => {
const banners = useBanners();

const showIntercom = localStorage.getItem("showIntercom");
const isMobile = useMediaQuery("(max-width: 768px)");
const { boot } = useIntercom();
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;

useEffect(() => {
if (showIntercom === "false" || isMobile) return;
// not using useMediaQuery as it toggles between true and false
if (showIntercom === "false" || window.innerWidth <= 768) return;
boot();
}, [showIntercom, isMobile]);
}, [showIntercom]);

const bannersHeight = useMemo(() => {
const activeBanners =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions)
});
}

if (updatedUser) {
if (updatedUser && hasEmailBeenChanged) {
// Skip sending verification email when user tries to change his primary email to a verified secondary email
if (secondaryEmail?.emailVerified) {
secondaryEmails.push({
Expand Down

0 comments on commit 00abd64

Please sign in to comment.