Skip to content

Commit

Permalink
Merge branch 'main' into push-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Udit-takkar authored Aug 27, 2024
2 parents 9b102c1 + 7aae55f commit 6ff00f0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
24 changes: 12 additions & 12 deletions apps/web/components/eventtype/EventAdvancedTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -582,14 +582,14 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupProps,
<ColorPicker
defaultValue={eventTypeColorState.lightEventTypeColor}
onChange={(value) => {
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);
}
Expand All @@ -607,14 +607,14 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupProps,
<ColorPicker
defaultValue={eventTypeColorState.darkEventTypeColor}
onChange={(value) => {
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);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/pages/settings/my-account/appearance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
Expand All @@ -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 ? (
Expand Down
4 changes: 2 additions & 2 deletions packages/features/ee/components/BrandColorsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
Expand All @@ -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 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ export const TotalBookingUsersTable = ({
}[]
| undefined;
}) => {
const filteredData = data && data?.length > 0 ? data?.filter((item) => !!item.user) : [];
return (
<Table>
<TableBody>
<>
{data && data?.length > 0 ? (
data?.map((item) => (
{filteredData.length > 0 ? (
filteredData.map((item) => (
<TableRow key={item.userId}>
<TableCell className="flex flex-row">
<Avatar
Expand Down
2 changes: 1 addition & 1 deletion packages/features/shell/Shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const useBanners = () => {
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;
Expand Down

0 comments on commit 6ff00f0

Please sign in to comment.