From a5123e9b17f6b56cede958111a677c80e1c83d59 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Fri, 10 Mar 2023 18:56:09 -0800 Subject: [PATCH] LegalScreen: Put policies URL on "Zulip terms" line Since the realms' individual policy URLs are shown (really just to disambiguate different realms with the same name) it looks a bit odd if the "Zulip terms" line doesn't have a URL, so add it. --- src/settings/LegalScreen.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/settings/LegalScreen.js b/src/settings/LegalScreen.js index e3d0122cd42..0269bc58f07 100644 --- a/src/settings/LegalScreen.js +++ b/src/settings/LegalScreen.js @@ -72,6 +72,8 @@ type Props = $ReadOnly<{| route: RouteProp<'legal', void>, |}>; +const zulipPoliciesUrl = new URL('https://zulip.com/policies/?nav=no'); + /** * A global, all-accounts screen linking to terms for all realms we know about. */ @@ -81,12 +83,17 @@ export default function LegalScreen(props: Props): Node { const globalSettings = useGlobalSelector(getGlobalSettings); const openZulipPolicies = useCallback(() => { - openLinkWithUserPreference(new URL('https://zulip.com/policies/?nav=no'), globalSettings); + openLinkWithUserPreference(zulipPoliciesUrl, globalSettings); }, [globalSettings]); return ( - + {viewModel.map(({ realm, name, policiesUrl }) => (