diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index 1e4f8af1dd2e5e..a35486141b95eb 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -582,14 +582,14 @@ export const EventAdvancedTab = ({ eventType, team }: Pick { + const newVal = { + ...eventTypeColorState, + lightEventTypeColor: value, + }; + formMethods.setValue("eventTypeColor", newVal, { shouldDirty: true }); + setEventTypeColorState(newVal); if (checkWCAGContrastColor("#ffffff", value)) { - const newVal = { - ...eventTypeColorState, - lightEventTypeColor: value, - }; setLightModeError(false); - formMethods.setValue("eventTypeColor", newVal, { shouldDirty: true }); - setEventTypeColorState(newVal); } else { setLightModeError(true); } @@ -607,14 +607,14 @@ export const EventAdvancedTab = ({ eventType, team }: Pick { + const newVal = { + ...eventTypeColorState, + darkEventTypeColor: value, + }; + formMethods.setValue("eventTypeColor", newVal, { shouldDirty: true }); + setEventTypeColorState(newVal); if (checkWCAGContrastColor("#101010", value)) { - const newVal = { - ...eventTypeColorState, - darkEventTypeColor: value, - }; setDarkModeError(false); - formMethods.setValue("eventTypeColor", newVal, { shouldDirty: true }); - setEventTypeColorState(newVal); } else { setDarkModeError(true); } diff --git a/apps/web/pages/settings/my-account/appearance.tsx b/apps/web/pages/settings/my-account/appearance.tsx index 9fe645435bd68b..b290489c0c7d12 100644 --- a/apps/web/pages/settings/my-account/appearance.tsx +++ b/apps/web/pages/settings/my-account/appearance.tsx @@ -350,10 +350,10 @@ const AppearanceView = ({ onChange={(value) => { if (checkWCAGContrastColor("#ffffff", value)) { setLightModeError(false); - brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true }); } else { setLightModeError(true); } + brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true }); }} /> {lightModeError ? ( @@ -378,10 +378,10 @@ const AppearanceView = ({ onChange={(value) => { if (checkWCAGContrastColor("#101010", value)) { setDarkModeError(false); - brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true }); } else { setDarkModeError(true); } + brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true }); }} /> {darkModeError ? ( diff --git a/packages/features/ee/components/BrandColorsForm.tsx b/packages/features/ee/components/BrandColorsForm.tsx index 4651e6faef4949..a51f21e39d0d42 100644 --- a/packages/features/ee/components/BrandColorsForm.tsx +++ b/packages/features/ee/components/BrandColorsForm.tsx @@ -68,10 +68,10 @@ const BrandColorsForm = ({ onChange={(value) => { if (checkWCAGContrastColor("#ffffff", value)) { setLightModeError(false); - brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true }); } else { setLightModeError(true); } + brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true }); }} /> {lightModeError ? ( @@ -96,10 +96,10 @@ const BrandColorsForm = ({ onChange={(value) => { if (checkWCAGContrastColor("#101010", value)) { setDarkModeError(false); - brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true }); } else { setDarkModeError(true); } + brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true }); }} /> {darkModeError ? ( diff --git a/packages/features/insights/components/TotalBookingUsersTable.tsx b/packages/features/insights/components/TotalBookingUsersTable.tsx index 405cfb85906ab2..772a63406c8512 100644 --- a/packages/features/insights/components/TotalBookingUsersTable.tsx +++ b/packages/features/insights/components/TotalBookingUsersTable.tsx @@ -17,12 +17,13 @@ export const TotalBookingUsersTable = ({ }[] | undefined; }) => { + const filteredData = data && data?.length > 0 ? data?.filter((item) => !!item.user) : []; return ( <> - {data && data?.length > 0 ? ( - data?.map((item) => ( + {filteredData.length > 0 ? ( + filteredData.map((item) => ( { const Layout = (props: LayoutProps) => { const banners = useBanners(); const pathname = usePathname(); - const isFullPageWithoutSidebar = pathname.startsWith("/apps/routing-forms/reporting/"); + const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/"); const { data: user } = trpc.viewer.me.useQuery(); const { boot } = useIntercom(); const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;