Remove all native base dependencies.
This commit is contained in:
44
App.js
44
App.js
@@ -1,9 +1,6 @@
|
||||
import { ApolloProvider } from "@apollo/client";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import AppLoading from "expo-app-loading";
|
||||
//import * as FileSystem from "expo-file-system";
|
||||
import * as Font from "expo-font";
|
||||
import React from "react";
|
||||
import { DefaultTheme, Provider as PaperProvider } from "react-native-paper";
|
||||
import { Provider } from "react-redux";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
import * as Sentry from "sentry-expo";
|
||||
@@ -24,34 +21,41 @@ Sentry.init({
|
||||
});
|
||||
|
||||
Sentry.Native.nativeCrash();
|
||||
|
||||
const theme = {
|
||||
...DefaultTheme,
|
||||
colors: {
|
||||
...DefaultTheme.colors,
|
||||
primary: "tomato",
|
||||
accent: "yellow",
|
||||
},
|
||||
};
|
||||
|
||||
export default class App extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isReady: false,
|
||||
};
|
||||
}
|
||||
// constructor(props) {
|
||||
// super(props);
|
||||
// this.state = {
|
||||
// isReady: false,
|
||||
// };
|
||||
// }
|
||||
|
||||
async componentDidMount() {
|
||||
logImEXEvent("imexmobile_app_start");
|
||||
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 });
|
||||
//this.setState({ isReady: true });
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.state.isReady) {
|
||||
return <AppLoading />;
|
||||
}
|
||||
// if (!this.state.isReady) {
|
||||
// return <AppLoading />;
|
||||
// }
|
||||
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<ApolloProvider client={client}>
|
||||
<ScreenMainComponent />
|
||||
<PaperProvider theme={theme}>
|
||||
<ScreenMainComponent />
|
||||
</PaperProvider>
|
||||
</ApolloProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
|
||||
Reference in New Issue
Block a user