Skip to content

Commit

Permalink
fix: upgrade & fix flash on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
arjendevos committed Jun 26, 2023
1 parent 310a716 commit 9743210
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"expo-status-bar": "^1.4.4",
"@arkweid/lefthook": "^0.7.7",
"@commitlint/config-conventional": "^17.0.2",
"@react-native-community/eslint-config": "^3.0.2",
Expand All @@ -73,6 +72,7 @@
"eslint-plugin-prettier": "^4.0.0",
"expo-cli": "^6.0.8",
"expo-linking": "^4.0.1",
"expo-status-bar": "^1.4.4",
"husky": "^8.0.2",
"jest": "^29.3.1",
"navigation-react-native": "^9.2.1",
Expand All @@ -85,8 +85,8 @@
"typescript": "^4.9.4"
},
"peerDependencies": {
"expo-status-bar": "*",
"expo-linking": "*",
"expo-status-bar": "*",
"navigation-react-native": "*",
"react": "*",
"react-native": "*"
Expand Down Expand Up @@ -165,11 +165,11 @@
]
},
"dependencies": {
"react-helmet": "^6.1.0",
"color": "^4.2.3",
"navigation": "^6.2.0",
"navigation-react": "^4.5.1",
"navigation-react-mobile": "^3.10.0",
"navigation-react-mobile": "^3.10.1",
"navigation-react-native-web": "^1.3.0",
"color": "^4.2.3"
"react-helmet": "^6.1.0"
}
}
34 changes: 19 additions & 15 deletions src/navigation/NavigationStack.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,31 @@ import OptimizedContext, {
} from '../contexts/OptimizedContext';
import { Head } from '../Head';
import type { BaseScreen } from 'react-native-ridge-navigation';
import { View, StyleSheet } from 'react-native';

function NavigationStack({ renderWeb }: { renderWeb?: (key: string) => any }) {
const { theme } = React.useContext(OptimizedContext);
return (
<NavigationMotion
unmountedStyle={{}}
mountedStyle={{}}
crumbStyle={{}}
duration={0}
renderMotion={(_, scene, key, active, state, data) => {
const screen = state.screen as BaseScreen;
const screenOptions = screen?.options;
const title = screenOptions?.title;
const description = screenOptions?.description;
return (
<div
<View
key={key}
style={{
position: 'absolute',
left: 0,
right: 0,
top: 0,
bottom: 0,
overflow: 'hidden',
display: 'flex',
flex: 1,
flexDirection: 'column',
// opacity: 1,
backgroundColor: theme.layout.backgroundColor as any,
}}
style={[
StyleSheet.absoluteFill,
styles.stack,
{
backgroundColor: theme.layout.backgroundColor,
},
]}
>
{active && (
<Head>
Expand All @@ -43,11 +41,17 @@ function NavigationStack({ renderWeb }: { renderWeb?: (key: string) => any }) {
<OptimizedContextProvider state={state} data={data}>
{renderWeb?.(state.key) || scene}
</OptimizedContextProvider>
</div>
</View>
);
}}
/>
);
}

const styles = StyleSheet.create({
stack: {
overflow: 'hidden',
},
});

export default NavigationStack;
13 changes: 9 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9493,14 +9493,19 @@ natural-compare@^1.4.0:
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==

navigation-react-mobile@*, navigation-react-mobile@^3.10.0:
navigation-react-mobile@*:
version "3.10.0"
resolved "https://registry.npmjs.org/navigation-react-mobile/-/navigation-react-mobile-3.10.0.tgz#ba9ef10d51b492a449b3afa9777debe86f70dabf"
integrity sha512-SEOhP6ugX02kZ/f+2KZA1G+UTMLhyBWLSJAGUfUrOAPSFqCmPv0jKJTRM2EoAvQg+FVqfwOObXNoDWf2UXEBIA==

navigation-react-mobile@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/navigation-react-mobile/-/navigation-react-mobile-3.10.1.tgz#40d659d71924d98f8a0b6e4caf834704cc1690db"
integrity sha512-tov4LZzqnD5oJBxp/rbGUwz92ya4XHM5gAkNDFufTnPOup1aRANyYzVmru/Uscy+Lp+jP+KLO98WAmn7XPTteg==

navigation-react-native-web@^1.3.0:
version "1.3.0"
resolved "https://registry.npmjs.org/navigation-react-native-web/-/navigation-react-native-web-1.3.0.tgz#dc192205d3d9fc117adac51d7b86c83748ac92b8"
resolved "https://registry.yarnpkg.com/navigation-react-native-web/-/navigation-react-native-web-1.3.0.tgz#dc192205d3d9fc117adac51d7b86c83748ac92b8"
integrity sha512-FULKMnqpc7EZ3uI6UVVpg1cxUyR/19pyfZahP4Fh4q5kitwrAzwqkTxT9fB7rspnhX1sDFq2E7UL46GFdx6uNQ==
dependencies:
navigation-react-mobile "*"
Expand All @@ -9512,12 +9517,12 @@ navigation-react-native@^9.2.1:

navigation-react@^4.5.1:
version "4.5.1"
resolved "https://registry.npmjs.org/navigation-react/-/navigation-react-4.5.1.tgz#47adb8ba220f0701736328b359f347a619f2fc6c"
resolved "https://registry.yarnpkg.com/navigation-react/-/navigation-react-4.5.1.tgz#47adb8ba220f0701736328b359f347a619f2fc6c"
integrity sha512-s8FUkLATlr2JcXiyOR9DUQlIAZNyqX3oW0m2u6VCLxmSNSUHUCqueSsULtRTS2FoBAYqN81tZzLMsSw0sBQeDg==

navigation@^6.2.0:
version "6.2.0"
resolved "https://registry.npmjs.org/navigation/-/navigation-6.2.0.tgz#9dee79f82e1ab603fa2d9bdd5465e42441fcbf6e"
resolved "https://registry.yarnpkg.com/navigation/-/navigation-6.2.0.tgz#9dee79f82e1ab603fa2d9bdd5465e42441fcbf6e"
integrity sha512-PcAsKXzTJ4WSLEz2AWHeIv+R9tvagN7qdMaGO8mY0SuPaY11q5HLBbpYQi6+kwljbmRKHju0gxRMwNf17e1zDg==

ncp@~2.0.0:
Expand Down

0 comments on commit 9743210

Please sign in to comment.