separated dummy component

This commit is contained in:
Nouman Tahir 2022-10-18 12:02:35 +05:00
parent 7b6317075e
commit 68b1db06c4

View File

@ -1,5 +1,5 @@
import React from 'react';
import {View, Text} from 'react-native'
import React, { useEffect } from 'react';
import { View, Text, Alert } from 'react-native';
import 'react-native-gesture-handler';
import { Provider, connect } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
@ -13,9 +13,31 @@ import messages from './config/locales';
import Application from './screens/application';
import { store } from './redux/store/store';
import { initQueryClient } from './providers/queries';
import { useAppSelector } from './hooks';
const queryClientProviderProps = initQueryClient();
const Dummy = () => {
const language = useAppSelector(state=>state.application.language);
useEffect(()=>{
// Alert.alert(language);
},[])
return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'yellow',
}}
>
<Text style={{ color: 'green' }}>App is Working!</Text>
</View>
)
}
const _renderApp = ({ locale }) => (
<PersistQueryClientProvider {...queryClientProviderProps}>
{/* <PersistGate loading={null} persistor={persistor}> */}
@ -23,7 +45,7 @@ const _renderApp = ({ locale }) => (
<SafeAreaProvider>
<Host>
{/* <Application /> */}
<View style={{flex:1, justifyContent:'center', alignItems:'center', backgroundColor:'yellow'}}><Text style={{color:'green'}}>App is Working!</Text></View>
<Dummy/>
</Host>
</SafeAreaProvider>
</IntlProvider>
@ -39,7 +61,7 @@ const App = connect(mapStateToProps)(_renderApp);
export default () => {
return (
<Provider store={ store }>
<Provider store={store}>
<App />
</Provider>
);