Skip to content

Commit e72df8b

Browse files
committed
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.
1 parent 6df6dab commit e72df8b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/settings/LegalScreen.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ type Props = $ReadOnly<{|
7272
route: RouteProp<'legal', void>,
7373
|}>;
7474

75+
const zulipPoliciesUrl = new URL('https://zulip.com/policies/?nav=no');
76+
7577
/**
7678
* A global, all-accounts screen linking to terms for all realms we know about.
7779
*/
@@ -81,12 +83,17 @@ export default function LegalScreen(props: Props): Node {
8183
const globalSettings = useGlobalSelector(getGlobalSettings);
8284

8385
const openZulipPolicies = useCallback(() => {
84-
openLinkWithUserPreference(new URL('https://zulip.com/policies/?nav=no'), globalSettings);
86+
openLinkWithUserPreference(zulipPoliciesUrl, globalSettings);
8587
}, [globalSettings]);
8688

8789
return (
8890
<Screen title="Legal">
89-
<NavRow title="Zulip terms" onPress={openZulipPolicies} type="external" />
91+
<NavRow
92+
title="Zulip terms"
93+
subtitle={{ text: '{_}', values: { _: zulipPoliciesUrl.toString() } }}
94+
onPress={openZulipPolicies}
95+
type="external"
96+
/>
9097
{viewModel.map(({ realm, name, policiesUrl }) => (
9198
<NavRow
9299
key={realm.toString()}

0 commit comments

Comments
 (0)