This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { StyleSheet, ImageBackground } from 'react-native' | |
const BackgroundPage = ({ background, children }) => ( | |
<ImageBackground source={background} style={styles.imageBackground}> | |
{children} | |
</ImageBackground> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useCallback } from 'react' | |
import { Image, View, Text } from 'react-native' | |
import PropTypes from 'prop-types' | |
import { useFocusEffect } from '@react-navigation/native' | |
import TouchableWrapper from '../../components/global/layout/TouchableWrapper' | |
import DefaultPage from '../../components/DefaultPage' | |
import AbeLogo from '../../../assets/AllBitsEqual_logo_light.png' | |
const SceneSplash = ({ navigation }) => { | |
useFocusEffect( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TouchableWrapper handlePress={() => navigation.navigate('Login')}> | |
<DefaultPage> | |
<Image | |
style={{ width: 150, height: 120 }} | |
source={AbeLogo} | |
/> | |
<View> | |
<Text style={{ fontSize: 23, marginTop: 80 }}> | |
by Konrad Abe | |
</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from 'react' | |
import { Text } from 'react-native' | |
import PropTypes from 'prop-types' | |
import TouchableWrapper from '../../components/global/layout/TouchableWrapper' | |
import DefaultPage from '../../components/DefaultPage' | |
const SceneSplash = ({ navigation }) => { | |
useEffect(() => { | |
setTimeout(() => { | |
navigation.navigate('Login') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { TouchableWithoutFeedback, StyleSheet, View } from 'react-native' | |
import PropTypes from 'prop-types' | |
const TouchableWrapper = ({ handlePress, children }) => ( | |
<TouchableWithoutFeedback | |
style={styles.touchableWrapper} | |
onPress={() => handlePress()} | |
> | |
<View style={styles.touchableWrapperHelper}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Button, Text } from 'react-native' | |
import PropTypes from 'prop-types' | |
import DefaultPage from '../../components/DefaultPage' | |
const SceneSettings = ({ navigation }) => ( | |
<DefaultPage> | |
<Text> | |
Settings | |
</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Text, Button } from 'react-native' | |
import PropTypes from 'prop-types' | |
import DefaultPage from '../../components/DefaultPage' | |
const SceneHome = ({ navigation }) => ( | |
<DefaultPage> | |
<Text> | |
Home | |
</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { USER_LOGIN } from '../../actions/user.actions' | |
import * as RootNavigation from '../../../navigation/RootNavigation' | |
const fakeLoginCheck = () => true // It's an older code, sir, but it checks out. | |
const userMiddleware = () => (next) => (action) => { | |
if (action.type === USER_LOGIN) { | |
if (fakeLoginCheck()) { | |
next(action) // continue with the login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react' | |
import { Text, TextInput, Button } from 'react-native' | |
import { connect } from 'react-redux' | |
import PropTypes from 'prop-types' | |
import DefaultPage from '../../components/DefaultPage' | |
import { userLogin } from '../../redux/actions/user.actions' | |
const SceneLogin = ({ loginUser, isUserLoggedIn, storedUserName }) => { | |
const [name, setName] = useState('') |