fix: don't use react-native-screens on web

seems `react-native-screens` doesn't handle active screens properly and shows a blank page instead on web when a number is specified in the `active` prop.

closes #7485
This commit is contained in:
Satyajit Sahoo
2020-03-19 16:38:34 +01:00
parent 3ea8eec432
commit b1a65fc73e
3 changed files with 24 additions and 9 deletions

View File

@@ -401,9 +401,9 @@ export default class CardStack extends React.Component<Props, State> {
left = insets.left,
} = focusedOptions.safeAreaInsets || {};
// Screens is buggy on iOS, so we don't enable it there
// Screens is buggy on iOS and web, so we only enable it on Android
// For modals, usually we want the screen underneath to be visible, so also disable it there
const isScreensEnabled = Platform.OS !== 'ios' && mode !== 'modal';
const isScreensEnabled = Platform.OS === 'android' && mode !== 'modal';
return (
<React.Fragment>