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