|
|
|
import { StyleSheet } from "react-native";
|
|
|
|
import { useFonts } from "expo-font";
|
|
|
|
import AppLoading from "expo-app-loading";
|
|
|
|
import Navigation from "./navigation/index";
|
|
|
|
import AlertModal from "./src/components/AlertModal";
|
|
|
|
import { Provider } from "react-redux";
|
|
|
|
import buildStore from "./src/redux/store";
|
|
|
|
import React from "react";
|
|
|
|
import { PersistGate } from "redux-persist/integration/react";
|
|
|
|
|
|
|
|
const { store, persistor } = buildStore();
|
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
let [fontsLoaded] = useFonts({
|
|
|
|
light: require("./assets/fonts/Farsi/Light.ttf"),
|
|
|
|
regular: require("./assets/fonts/Farsi/Regular.ttf"),
|
|
|
|
bold: require("./assets/fonts/Farsi/Medium.ttf"),
|
|
|
|
demi: require("./assets/fonts/Farsi/DemiBold.ttf"),
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!fontsLoaded) {
|
|
|
|
return <AppLoading />;
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<Provider store={store}>
|
|
|
|
<PersistGate loading={null} persistor={persistor}>
|
|
|
|
<Navigation />
|
|
|
|
<AlertModal />
|
|
|
|
</PersistGate>
|
|
|
|
</Provider>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({});
|
|
|
|
|
|
|
|
export default App;
|