import { Platform , View } from 'react-native' ; import React from 'react' ; export const withScreen = ( WrappedComponent ) => { return ( props ) => { return ( < View style = { Platform . OS === 'web' ? { alignItems : 'center' , justifyContent : 'center' , height : '100vh' , } : { flex : 1 , alignItems : 'center' , justifyContent : 'center' , } } > < WrappedComponent { ... props } / > < /View>); } ; } ;