minor fixes

This commit is contained in:
ammarahm-ed
2020-05-07 01:43:56 +05:00
parent 798f1083ed
commit dbb59fc9d3

View File

@@ -14,8 +14,15 @@ import { useIsFocused } from '@react-navigation/native';
import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common'; import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common';
import {Header} from '../../components/header'; import {Header} from '../../components/header';
import {useTracked} from '../../provider'; import {useTracked} from '../../provider';
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/eventManager'; import {
import {eLoginDialogNavigateBack} from '../../services/events'; eSubscribeEvent,
eUnSubscribeEvent,
eSendEvent,
} from '../../services/eventManager';
import {
eLoginDialogNavigateBack,
eCloseLoginDialog,
} from '../../services/events';
import * as Animatable from 'react-native-animatable'; import * as Animatable from 'react-native-animatable';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { import {
@@ -46,7 +53,9 @@ export const Signup = ({route,navigation}) => {
const [failed, setFailed] = useState(false); const [failed, setFailed] = useState(false);
const [modalVisible, setModalVisible] = useState(false); const [modalVisible, setModalVisible] = useState(false);
const [confirmPassword, setConfirmPassword] = useState(false); const [confirmPassword, setConfirmPassword] = useState(false);
const [key, setKey] = useState('xyzLLbr1tafjdfklsdfjlksafjhklfadsafsljkfsfadfljkdfassafsafaffasdfsafafs'); const [key, setKey] = useState(
'xyzLLbr1tafjdfklsdfjlksafjhklfadsafsljkfsfadfljkdfassafsafaffasdfsafafs',
);
const [passwordReEnter, setPasswordReEnter] = useState(null); const [passwordReEnter, setPasswordReEnter] = useState(null);
const [secureEntry, setSecureEntry] = useState(true); const [secureEntry, setSecureEntry] = useState(true);
let isFocused = useIsFocused(); let isFocused = useIsFocused();
@@ -114,7 +123,7 @@ export const Signup = ({route,navigation}) => {
<Modal <Modal
animated={true} animated={true}
animationType="fade" animationType="fade"
visible={modalVisible} visible={true}
transparent={true}> transparent={true}>
<View <View
style={{ style={{
@@ -126,6 +135,7 @@ export const Signup = ({route,navigation}) => {
style={{ style={{
width: '100%', width: '100%',
backgroundColor: colors.bg, backgroundColor: colors.bg,
paddingHorizontal: DDS.isTab ? '20%' : '0%',
height: '100%', height: '100%',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
@@ -139,7 +149,6 @@ export const Signup = ({route,navigation}) => {
}}> }}>
Hi there! Hi there!
</Text> </Text>
<Text <Text
style={{ style={{
fontFamily: WEIGHT.regular, fontFamily: WEIGHT.regular,
@@ -148,9 +157,8 @@ export const Signup = ({route,navigation}) => {
textAlign: 'center', textAlign: 'center',
color: colors.pri, color: colors.pri,
}}> }}>
All your data is end-to-end encrypted. This All your data is end-to-end encrypted. This means that we cannot
means that we cannot read your data or recover your password if read your data or recover your password if you forget it.{' '}
you forget it.{' '}
<Text <Text
style={{ style={{
color: colors.errorText, color: colors.errorText,
@@ -219,8 +227,10 @@ export const Signup = ({route,navigation}) => {
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
DDS.isTab
? eSendEvent(eCloseLoginDialog)
: navigation.navigate('Home');
setModalVisible(false); setModalVisible(false);
navigation.navigate('Home');
}} }}
activeOpacity={opacity} activeOpacity={opacity}
style={{ style={{
@@ -534,7 +544,6 @@ export const Signup = ({route,navigation}) => {
borderColor: colors.errorText, borderColor: colors.errorText,
}, },
}); });
} else { } else {
setInvalidPassword(false); setInvalidPassword(false);
_passContainer.current?.setNativeProps({ _passContainer.current?.setNativeProps({
@@ -671,7 +680,7 @@ export const Signup = ({route,navigation}) => {
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
height: 150, height: 75,
}}> }}>
<TouchableOpacity <TouchableOpacity
onPress={() => { onPress={() => {
@@ -703,6 +712,4 @@ export const Signup = ({route,navigation}) => {
); );
}; };
export default Signup; export default Signup;