fix: #16028 Org Settings - SEOIndexing,Disable Org Url (#16075)

Co-authored-by: Amit Sharma <[email protected]>
Co-authored-by: Hariom <[email protected]>
Co-authored-by: Syed Ali Shahbaz <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-11-29 10:21:14 +05:30
1 parent b5c6d7af91
commit f631abfdc4
20 files changed
+454 -23

No files matched your search

@@ -219,6 +219,12 @@ async function getUserPageProps(context: GetServerSidePropsContext) {
} as const;
}
const allowSEOIndexing = org
? user?.profile?.organization?.organizationSettings?.allowSEOIndexing
? user?.allowSEOIndexing
: false
: user?.allowSEOIndexing;
const props: Props = {
eventData: {
id: eventData.id,
@@ -230,7 +236,7 @@ async function getUserPageProps(context: GetServerSidePropsContext) {
slug,
trpcState: ssr.dehydrate(),
isBrandingHidden: user?.hideBranding,
isSEOIndexable: user?.allowSEOIndexing,
isSEOIndexable: allowSEOIndexing,
themeBasis: username,
bookingUid: bookingUid ? `${bookingUid}` : null,
rescheduleUid: null,
@@ -69,6 +69,7 @@ type UserPageProps = {
| "currency"
| "recurringEvent"
>)[];
isOrgSEOIndexable: boolean | undefined;
} & EmbedProps;
export const getServerSideProps: GetServerSideProps<UserPageProps> = async (context) => {
@@ -194,6 +195,7 @@ export const getServerSideProps: GetServerSideProps<UserPageProps> = async (cont
themeBasis: user.username,
trpcState: ssr.dehydrate(),
markdownStrippedBio,
isOrgSEOIndexable: org?.organizationSettings?.allowSEOIndexing,
},
};
};