Closes #11
Why the weird import order? Because it was the only way to make the linter happy
This commit is contained in:
4 files changed
+43
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
EXPO_PUBLIC_EVENT_API_URL=https://studentersamfundet.no
|
||||
EXPO_PUBLIC_DUSKEN_API_URL=https://galtinn.neuf.no
|
||||
EXPO_PUBLIC_DUSKEN_FORGOT_PASSWORD_URL=https://galtinn.neuf.no/auth/password_reset/
|
||||
EXPO_PUBLIC_DUSKEN_PRIVACY_POLICY_URL=https://galtinn.neuf.no/nb/personvern/
|
||||
EXPO_PUBLIC_SENTRY_DSN=
|
||||
EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY=
|
||||
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import { Linking, StyleSheet, Text, TouchableOpacity } from 'react-native';
|
||||
|
||||
import theme from 'src/theme';
|
||||
|
||||
const PrivacyButton = () => (
|
||||
<TouchableOpacity
|
||||
style={styles.button}
|
||||
onPress={() => Linking.openURL(process.env.EXPO_PUBLIC_DUSKEN_PRIVACY_POLICY_URL)}
|
||||
>
|
||||
<Text style={styles.linkText}>Personvern</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
margin: 16,
|
||||
},
|
||||
linkText: {
|
||||
color: theme.colors.neufBlue,
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
textDecorationLine: 'underline',
|
||||
},
|
||||
});
|
||||
|
||||
export default PrivacyButton;
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { View, StyleSheet, ActivityIndicator } from 'react-native';
|
||||
|
||||
import PrivacyButton from 'src/components/PrivacyButton';
|
||||
import theme from 'src/theme';
|
||||
|
||||
import MembershipInfo from './MembershipInfo';
|
||||
@@ -20,10 +21,20 @@ const Membership = () => {
|
||||
}
|
||||
|
||||
if (isAuthenticated) {
|
||||
return <Proof onLogoutPress={onLogoutPress} fetchUser={fetchUser} isFetchingUserData={isFetchingUserData} />;
|
||||
return (
|
||||
<>
|
||||
<Proof onLogoutPress={onLogoutPress} fetchUser={fetchUser} isFetchingUserData={isFetchingUserData} />
|
||||
<PrivacyButton />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return <MembershipInfo onRegister={onRegisterPress} onLogin={onLoginPress} />;
|
||||
return (
|
||||
<>
|
||||
<MembershipInfo onRegister={onRegisterPress} onLogin={onLoginPress} />
|
||||
<PrivacyButton />
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default Membership;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Button, Incubator } from 'react-native-ui-lib';
|
||||
|
||||
import FormErrors from 'src/components/FormErrors';
|
||||
import FormInput from 'src/components/FormInput';
|
||||
import PrivacyButton from 'src/components/PrivacyButton';
|
||||
import theme from 'src/theme';
|
||||
|
||||
import useUserRegister from './useUserRegister';
|
||||
@@ -58,6 +59,7 @@ const UserRegister = () => {
|
||||
<Text>Registrer meg</Text>
|
||||
</Button>
|
||||
{isRegisteringUser && <ActivityIndicator color={theme.colors.neufOrange} />}
|
||||
<PrivacyButton />
|
||||
</ScrollView>
|
||||
</View>
|
||||
<Toast
|
||||
|
||||
Reference in new issue
Block a user