Added navigation to application, internationalization, and sign in screen.

This commit is contained in:
Patrick Fic
2020-08-11 16:42:26 -07:00
parent c7344dd7a2
commit 767233cea3
19 changed files with 1258 additions and 161 deletions

61
App.js
View File

@@ -1,31 +1,44 @@
import { StatusBar } from "expo-status-bar";
import { Ionicons } from "@expo/vector-icons";
import { AppLoading } from "expo";
import * as Font from "expo-font";
import React from "react";
import {
SafeAreaView,
StatusBar as rnStatusBar,
StyleSheet,
Text,
View,
} from "react-native";
import { store, persistor } from "./redux/store";
import { StatusBar as rnStatusBar, StyleSheet } from "react-native";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import SignIn from "./components/signin.component";
import ScreenMainComponent from "./components/screen-main/screen-main.component";
import { persistor, store } from "./redux/store";
import "./translations/i18n";
export default function App() {
return (
<Provider store={store}>
<PersistGate persistor={persistor}>
<SafeAreaView style={styles.container}>
<View style={styles.container}>
<Text>Open up App.js to start working on your app! ttt</Text>
<StatusBar style="auto" />
<SignIn />
</View>
</SafeAreaView>
</PersistGate>
</Provider>
);
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
isReady: false,
};
}
async componentDidMount() {
await Font.loadAsync({
Roboto: require("native-base/Fonts/Roboto.ttf"),
Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf"),
...Ionicons.font,
});
this.setState({ isReady: true });
}
render() {
if (!this.state.isReady) {
return <AppLoading />;
}
return (
<Provider store={store}>
<PersistGate persistor={persistor}>
<ScreenMainComponent />
</PersistGate>
</Provider>
);
}
}
const styles = StyleSheet.create({