help me understand this code: import React, {useState} from 'react'; import {StyleSheet,…
- User
help me understand this code: import React, {useState} from 'react'; import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'; import DeviceInfo from 'react-native-device-info'; // import DeviceInfo from 'react-native-device-info'; import 'react-native-gesture-handler'; // import AppWrapper from './src/App'; import { CUSTOM_NATIVE_APPS_USER_AGENT_ENUMS, MEC_LUDO_CHANNEL_IDS, } from 'playcircle-utils'; import appLogger from './src/common/logging/AppLogger'; import AppWrapper from './src/containers/StandaloneLauncher/StandAloneLauncher'; import {AppType} from './src/deciders'; /**
- App wrapper for Ludo app to inject props when runnning individual builds
*/
const App = () => {
// const userAgent =
Mozilla/5.0 (Linux; Android 8.1.0; Redmi 6 Pro Build/OPM1.171019.019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36 [FTPKRAndroid/${DeviceInfo.getVersion()}]; const [testCount, setCount] = useState(0); const [isFocused, setIsFocused] = useState(true); const userAgent =Mozilla/5.0 (Linux; Android 8.1.0; Redmi 6 Pro Build/OPM1.171019.019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36 [${ CUSTOM_NATIVE_APPS_USER_AGENT_ENUMS.PKRAndroid }/${DeviceInfo.getVersion()}]; // comes from native for local dev app setup // to be passed as prop to from MEC in actual setup // const [exitCodePayload, setCode] = useState({ // exitCode: 1200, // message: '', // gameIdentifier: 0, // }); appLogger.log('App'); return ( <TouchableOpacity style={styles.mockMain} activeOpacity={1} onPress={() => { setIsFocused(!isFocused); setCount((count) => count + 1); }}> Press to re-render App: {testCount} <AppWrapper channelId={MEC_LUDO_CHANNEL_IDS.ANDROID} loglevel={'trace'} userAgent={userAgent} hmsData={{ ludoFirstLaunch: true, ludoHelpPageCount: 0, ludoButton: 1, ludoHelpPageShown: false, ludoFtueWatchedCount: 0, }} taxonomyUrl={''} accountBalance={{ cashBalance: 0, depositBalance: 0, nonWithdrawableBalance: 0, practiceBalance: 0, promocashBalance: 0, withdrawableBalance: 0, }} lobbyCallback={undefined} currentAppType={AppType.LudoPrimary} ludoLobbyLoadInitParams={{ ludoLoadStartTime: 0, ludoInitiationPoint: '', }} appStartTimestampInMs={'1693897278103'} mecGameComponent={() => } /> ); }; const styles = StyleSheet.create({ mockMain: { backgroundColor: '#f1c40f', width: '100%', }, container: { flex: 1, }, }); export default App;
- App wrapper for Ludo app to inject props when runnning individual builds
*/
const App = () => {
// const userAgent =
- Assistant