Skip to content

Commit

Permalink
fix: linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed Apr 19, 2023
1 parent ee729c2 commit b2d769c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 45 deletions.
10 changes: 1 addition & 9 deletions src/screens/LoginScreen/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,7 @@ export const LoginScreen = memo(({ navigation, setSetupDone }: LoginScreenProps)
alignItems: "center",
marginTop: 20
}}
onPress={() => {
Linking.canOpenURL("https://drive.filen.io/forgot-password")
.then(supported => {
if (supported) {
Linking.openURL("https://drive.filen.io/forgot-password").catch(console.error)
}
})
.catch(console.error)
}}
onPress={() => Linking.openURL("https://drive.filen.io/forgot-password").catch(console.error)}
>
<Text
style={{
Expand Down
20 changes: 2 additions & 18 deletions src/screens/RegisterScreen/RegisterScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,7 @@ export const RegisterScreen = memo(({ navigation }: RegisterScreenProps) => {
style={{
color: getColor(darkMode, "linkPrimary")
}}
onPress={() => {
Linking.canOpenURL("https://filen.io/terms")
.then(supported => {
if (supported) {
Linking.openURL("https://filen.io/terms").catch(console.error)
}
})
.catch(console.error)
}}
onPress={() => Linking.openURL("https://filen.io/terms").catch(console.error)}
>
&nbsp;Terms of Service
</Text>
Expand All @@ -161,15 +153,7 @@ export const RegisterScreen = memo(({ navigation }: RegisterScreenProps) => {
style={{
color: getColor(darkMode, "linkPrimary")
}}
onPress={() => {
Linking.canOpenURL("https://filen.io/privacy")
.then(supported => {
if (supported) {
Linking.openURL("https://filen.io/privacy").catch(console.error)
}
})
.catch(console.error)
}}
onPress={() => Linking.openURL("https://filen.io/privacy").catch(console.error)}
>
&nbsp;Privacy Policy
</Text>
Expand Down
20 changes: 2 additions & 18 deletions src/screens/SettingsAccountScreen/SettingsAccountScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,13 @@ export const SettingsAccountScreen = memo(({ navigation }: SettingsAccountScreen
<>
<SettingsGroup marginTop={5}>
<SettingsButtonLinkHighlight
onPress={() => {
Linking.canOpenURL("https://drive.filen.io")
.then(supported => {
if (supported) {
Linking.openURL("https://drive.filen.io").catch(console.error)
}
})
.catch(console.error)
}}
onPress={() => Linking.openURL("https://drive.filen.io").catch(console.error)}
title={i18n(lang, "changeEmailPassword")}
withBottomBorder={true}
borderTopRadius={10}
/>
<SettingsButtonLinkHighlight
onPress={() => {
Linking.canOpenURL("https://drive.filen.io")
.then(supported => {
if (supported) {
Linking.openURL("https://drive.filen.io").catch(console.error)
}
})
.catch(console.error)
}}
onPress={() => Linking.openURL("https://drive.filen.io").catch(console.error)}
title={i18n(lang, accountSettings.twoFactorEnabled ? "disable2FA" : "enable2FA")}
withBottomBorder={true}
/>
Expand Down

0 comments on commit b2d769c

Please sign in to comment.