Added navigation to application, internationalization, and sign in screen.
This commit is contained in:
61
App.js
61
App.js
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user