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, useEffect } from 'react' | |
import PropTypes from 'prop-types' | |
import { connect } from 'react-redux' | |
import { Text, StyleSheet } from 'react-native' | |
import BackgroundPage from '../../components/global/layout/BackgroundPage' | |
import { initialiseApplication } from '../../redux/actions/application.actions' | |
import background from '../../../assets/bg_abstract_01.jpg' | |
const SceneDataCheck = ({ initApp }) => { | |
const [timestamp] = useState(Date.now()) |
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 { | |
INIT_APPLICATION, | |
} from '../../actions/application.actions' | |
import manifest from '../../../../app.json' | |
const { expo: { name, version: manifestVersion } } = manifest | |
const applicationMiddleware = ({ getState }) => (next) => (action) => { | |
switch (action.type) { | |
case INIT_APPLICATION: { |
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 { View, StyleSheet } from 'react-native' | |
import PropTypes from 'prop-types' | |
import BackgroundPage from '../../components/global/layout/BackgroundPage' | |
import RockPaperScissorsLizardSpock from '../../components/other/RockPaperScissorsLizardSpock' | |
import IconButton from '../../components/global/ui/IconButton' | |
import backgroundImage from '../../../assets/bg_abstract_02.jpg' | |
const SceneGameHome = ({ navigation }) => ( | |
<BackgroundPage background={backgroundImage}> |
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 { Image, StyleSheet } from 'react-native' | |
import PropTypes from 'prop-types' | |
import { connect } from 'react-redux' | |
import { userLogout } from '../../redux/actions/user.actions' | |
import TextButton from '../../components/global/ui/TextButton' | |
import BackgroundPage from '../../components/global/layout/BackgroundPage' | |
import backgroundImage from '../../../assets/bg_abstract_02.jpg' | |
import logo from '../../../assets/game_logo.png' |
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 { connect } from 'react-redux' // #1 grab connect from react-redux | |
// ... | |
const SceneSplash = ({ isUserLoggedIn, navigation }) => { | |
const navigationTarget = isUserLoggedIn ? 'Home' : 'Login' // #2 determine path | |
useFocusEffect( | |
useCallback(() => { | |
const delayedNavigation = setTimeout(() => { |
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 { StatusBar } from 'react-native' | |
import { Provider } from 'react-redux' | |
import { PersistGate } from 'redux-persist/integration/react' | |
import { enableScreens } from 'react-native-screens' | |
import store, { persistor } from './src/redux/store' | |
import Navigation from './src/navigation' | |
import SceneAppLoading from './src/scenes/auth/sceneAppLoading' | |
enableScreens() |
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 { applyMiddleware, createStore } from 'redux' | |
import { persistStore, persistReducer } from 'redux-persist' | |
import { AsyncStorage } from 'react-native' | |
import rootReducer from './reducers/rootReducer' | |
import middleware from './middleware' | |
const persistConfig = { | |
key: 'root', | |
storage: AsyncStorage, | |
} |
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 { | |
View, Text, TextInput, StyleSheet, | |
} from 'react-native' | |
import { connect } from 'react-redux' | |
import PropTypes from 'prop-types' | |
import { userLogin } from '../../redux/actions/user.actions' | |
import BackgroundPage from '../../components/global/layout/BackgroundPage' | |
import backgroundImage from '../../../assets/bg_abstract_01.jpg' | |
import TextButton from '../../components/global/ui/TextButton' |
NewerOlder