From 0c3c98d7af361d7bb6ed60ffbea73b5088aa186b Mon Sep 17 00:00:00 2001 From: Mo Date: Fri, 16 Sep 2022 12:44:06 -0500 Subject: [PATCH] refactor(mobile): default to web frame if isDev (#1586) * refactor(mobile): default to web frame if isDev * fix: ignore native challenges * fix: use contentInset for padding --- packages/components/.eslintignore | 1 + packages/mobile/.eslintignore | 9 +++++++-- packages/mobile/src/AppStack.tsx | 13 +++++++++++++ packages/mobile/src/Lib/Application.ts | 4 ++++ packages/mobile/src/MobileWebAppContainer.tsx | 1 + 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 packages/components/.eslintignore diff --git a/packages/components/.eslintignore b/packages/components/.eslintignore new file mode 100644 index 000000000..53c37a166 --- /dev/null +++ b/packages/components/.eslintignore @@ -0,0 +1 @@ +dist \ No newline at end of file diff --git a/packages/mobile/.eslintignore b/packages/mobile/.eslintignore index 7b9e4fbcc..aee931263 100644 --- a/packages/mobile/.eslintignore +++ b/packages/mobile/.eslintignore @@ -1,3 +1,8 @@ metro.config.js -packages/mobile/html/Web.bundle/src/components -packages/mobile/html/Web.bundle/src/web-src +html/**/* +node_modules +ios +e2e +android +fastlane +WebFrame \ No newline at end of file diff --git a/packages/mobile/src/AppStack.tsx b/packages/mobile/src/AppStack.tsx index d1abe60a6..d2ec25580 100644 --- a/packages/mobile/src/AppStack.tsx +++ b/packages/mobile/src/AppStack.tsx @@ -146,6 +146,19 @@ export const AppStackComponent = (props: ModalStackNavigationProp<'AppStack'>) = return removeObserver }, [application, navigation]) + if (IsDev) { + return ( + ({ + headerShown: false, + })} + initialRouteName={SCREEN_NOTES} + > + + + ) + } + return ( { ref={webViewRef} source={{ uri: sourceUri }} originWhitelist={['*']} + contentInset={{ top: 30, bottom: 10 }} onLoad={() => {}} onError={(err) => console.error('An error has occurred', err)} onHttpError={() => console.error('An HTTP error occurred')}