Skip to content

Commit bbd56e8

Browse files
committed
update pin to use TOS component
1 parent 4764237 commit bbd56e8

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed

packages/mobile-app/app/onboarding/create-pin.tsx

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { PinInputComponent } from "@/components/PinInputComponent";
1414
import { useState } from "react";
1515
import { useFacade } from "@/data/facades";
1616
import { CheckBox } from "@ui-kitten/components";
17+
import { TermsOfService } from "@/components/TermsOfService/TermsOfService";
1718

1819
const MIN_PIN_LENGTH = 4;
1920
const MAX_PIN_LENGTH = 8;
@@ -78,6 +79,10 @@ const styles = StyleSheet.create({
7879
fontSize: 16,
7980
fontWeight: "600",
8081
},
82+
termsContainer: {
83+
width: "100%",
84+
marginBottom: 16,
85+
},
8186
});
8287

8388
export default function CreatePin() {
@@ -218,6 +223,12 @@ export default function CreatePin() {
218223
placeholder="Enter account name"
219224
autoFocus
220225
/>
226+
<View style={styles.termsContainer}>
227+
<TermsOfService
228+
checked={confirmChecked}
229+
onChange={setConfirmChecked}
230+
/>
231+
</View>
221232
</View>
222233
) : (
223234
<PinInputComponent
@@ -230,35 +241,15 @@ export default function CreatePin() {
230241
/>
231242
)}
232243

233-
<View style={{ width: "100%", gap: 16 }}>
234-
{step === "name" && (
235-
<CheckBox checked={confirmChecked} onChange={setConfirmChecked}>
236-
<Hyperlink
237-
linkDefault
238-
linkStyle={{ color: "#2980b9" }}
239-
linkText={(url) =>
240-
url === "https://oreowallet.com/agreement"
241-
? "Oreowallet Terms of Service"
242-
: url
243-
}
244-
>
245-
<Text>
246-
I agree to the https://oreowallet.com/agreement and agree to
247-
upload my view keys to the Oreowallet server.
248-
</Text>
249-
</Hyperlink>
250-
</CheckBox>
251-
)}
252-
<TouchableOpacity
253-
style={[styles.button, !isStepValid() && styles.buttonDisabled]}
254-
disabled={!isStepValid()}
255-
onPress={handleContinue}
256-
>
257-
<Text style={styles.buttonText}>
258-
{step === "name" ? "Create Account" : "Continue"}
259-
</Text>
260-
</TouchableOpacity>
261-
</View>
244+
<TouchableOpacity
245+
style={[styles.button, !isStepValid() && styles.buttonDisabled]}
246+
disabled={!isStepValid()}
247+
onPress={handleContinue}
248+
>
249+
<Text style={styles.buttonText}>
250+
{step === "name" ? "Create Account" : "Continue"}
251+
</Text>
252+
</TouchableOpacity>
262253
</View>
263254
</KeyboardAvoidingView>
264255
);

0 commit comments

Comments
 (0)