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

@@ -43,6 +43,12 @@ const OrgAppearanceView = ({
} = themeForm;
const [hideBrandingValue, setHideBrandingValue] = useState(currentOrg?.hideBranding ?? false);
const [allowSEOIndexingValue, setAllowSEOIndexingValue] = useState(
currentOrg?.organizationSettings?.allowSEOIndexing ?? false
);
const [orgProfileRedirectsToVerifiedDomainValue, setOrgProfileRedirectsToVerifiedDomainValue] = useState(
currentOrg?.organizationSettings?.orgProfileRedirectsToVerifiedDomain ?? false
);
const brandColorsFormMethods = useForm<BrandColorsFormValues>({
defaultValues: {
@@ -153,6 +159,36 @@ const OrgAppearanceView = ({
}}
switchContainerClassName="mt-6"
/>
<SettingsToggle
data-testid={`${currentOrg?.id}-seo-indexing-switch`}
toggleSwitchAtTheEnd={true}
title={t("seo_indexing")}
description={t("allow_seo_indexing")}
disabled={mutation.isPending}
checked={allowSEOIndexingValue}
onCheckedChange={(checked) => {
setAllowSEOIndexingValue(checked);
mutation.mutate({ allowSEOIndexing: checked });
}}
switchContainerClassName="mt-6"
/>
<SettingsToggle
toggleSwitchAtTheEnd={true}
title={t("disable_org_url_label")}
description={t("disable_org_url_description", {
orgSlug: currentOrg?.slug,
destination: currentOrg?.organizationSettings?.orgAutoAcceptEmail,
})}
disabled={mutation.isPending}
checked={orgProfileRedirectsToVerifiedDomainValue}
onCheckedChange={(checked) => {
setOrgProfileRedirectsToVerifiedDomainValue(checked);
mutation.mutate({ orgProfileRedirectsToVerifiedDomain: checked });
}}
switchContainerClassName="mt-6"
/>
</div>
);
};