The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 00:30 UTC
refactor(mobile): use shared legal document controls (#21914)
Julius Marminge committed
Oct 19, 2026 at 15:04 UTC
3e0f501c7d3c4a4864718330645507a9ae0a4556
1 file changed
+13
-32
apps/mobile/src/features/settings/components/SettingsLegalDocumentRouteScreen.tsx
+13
-32
@@ -3,6 +3,8 @@ import { useCallback, useLayoutEffect, useState } from "react";
3
import { Linking, Pressable, View } from "react-native";
4
import { WebView } from "react-native-webview";
5
6
+import { Button } from "../../../components/ui/Button";
7
+import { IconButton } from "../../../components/ui/IconButton";
8
import { AppActivityIndicator } from "../../../components/ui/AppActivityIndicator";
9
import { AppText as Text } from "../../../components/ui/AppText";
10
import { LoadingStrip } from "../../../components/ui/LoadingStrip";
@@ -13,21 +15,11 @@ export function SettingsLegalDocumentCloseHeaderButton() {
15
const navigation = useNavigation();
16
17
return (
16
- <Pressable
18
+ <IconButton
19
accessibilityLabel="Close legal document"
18
- accessibilityRole="button"
19
- hitSlop={12}
20
+ icon="xmark"
21
onPress={() => navigation.goBack()}
21
- className="p-2 active:opacity-60"
22
- >
23
- <SymbolView
24
- name="xmark"
25
- size={18}
26
- tintColorClassName={"accent-icon"}
27
- type="monochrome"
28
- weight="semibold"
29
- />
30
- </Pressable>
22
+ />
23
);
24
}
25
@@ -39,21 +31,11 @@ export function SettingsLegalDocumentExternalHeaderButton({
31
const safeExternalUrl = isLegalDocumentUrl(externalUrl) ? externalUrl : LEGAL_URL;
32
33
return (
42
- <Pressable
34
+ <IconButton
35
accessibilityLabel="Open legal documents in external browser"
44
- accessibilityRole="button"
45
- hitSlop={12}
36
+ icon="safari"
37
onPress={() => void Linking.openURL(safeExternalUrl).catch(() => undefined)}
47
- className="p-2 active:opacity-60"
48
- >
49
- <SymbolView
50
- name="safari"
51
- size={19}
52
- tintColorClassName={"accent-icon"}
53
- type="monochrome"
54
- weight="regular"
55
- />
56
- </Pressable>
38
+ />
39
);
40
}
41
@@ -104,16 +86,15 @@ export function SettingsLegalDocumentRouteScreen({
86
</Text>
87
</View>
88
<View className="w-full max-w-[320px] gap-2">
107
- <Pressable
108
- accessibilityRole="button"
89
+ <Button
90
+ label="Try Again"
91
+ tone="contrast"
92
+ fullWidth
93
onPress={() => {
94
setLoadError(null);
95
setReloadKey((value) => value + 1);
96
}}
113
- className="items-center rounded-xl bg-foreground px-4 py-3 active:opacity-80"
114
- >
115
- <Text className="font-t3-bold text-base text-sheet">Try Again</Text>
116
- </Pressable>
97
+ />
98
<Pressable
99
accessibilityRole="link"
100
onPress={() => openExternalUrl(documentUrl)}