diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx index a19b89cbf8..c99b464202 100644 --- a/apps/web/pages/[user].tsx +++ b/apps/web/pages/[user].tsx @@ -36,6 +36,7 @@ import { ssrInit } from "@server/lib/ssr"; export function UserPage(props: InferGetServerSidePropsType) { const { users, profile, eventTypes, markdownStrippedBio, entity } = props; + const [user] = users; //To be used when we only have a single user, not dynamic group useTheme(profile.theme); const { t } = useLocale(); @@ -82,6 +83,10 @@ export function UserPage(props: InferGetServerSidePropsType
@@ -214,6 +219,7 @@ export type UserPageProps = { theme: string | null; brandColor: string; darkBrandColor: string; + allowSEOIndexing: boolean; }; users: Pick[]; themeBasis: string | null; @@ -276,6 +282,7 @@ export const getServerSideProps: GetServerSideProps = async (cont away: true, verified: true, allowDynamicBooking: true, + allowSEOIndexing: true, }, }); @@ -315,6 +322,7 @@ export const getServerSideProps: GetServerSideProps = async (cont theme: user.theme, brandColor: user.brandColor, darkBrandColor: user.darkBrandColor, + allowSEOIndexing: user.allowSEOIndexing ?? true, }; const eventTypesWithHidden = await getEventTypesWithHiddenFromDB(user.id); diff --git a/apps/web/pages/[user]/[type].tsx b/apps/web/pages/[user]/[type].tsx index 4f3d96c2b1..2ef5eb038f 100644 --- a/apps/web/pages/[user]/[type].tsx +++ b/apps/web/pages/[user]/[type].tsx @@ -30,6 +30,7 @@ export default function Type({ booking, away, isBrandingHidden, + isSEOIndexable, rescheduleUid, entity, duration, @@ -41,6 +42,7 @@ export default function Type({ eventSlug={slug} rescheduleUid={rescheduleUid ?? undefined} hideBranding={isBrandingHidden} + isSEOIndexable={isSEOIndexable ?? true} entity={entity} /> { label: nameOfDay(localeProp, user.weekStart === "Sunday" ? 0 : 1), }, allowDynamicBooking: user.allowDynamicBooking ?? true, + allowSEOIndexing: user.allowSEOIndexing ?? true, }, }); const { @@ -124,6 +125,7 @@ const GeneralView = ({ localeProp, user }: GeneralViewProps) => { getValues, } = formMethods; const isDisabled = isSubmitting || !isDirty; + return (
{ )} />
+ +
+ ( + { + formMethods.setValue("allowSEOIndexing", checked, { shouldDirty: true }); + }} + /> + )} + /> +
+