mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 04:45:19 +08:00
refactor: use react-native-screens for web as well
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { Platform, StyleProp, ViewStyle } from 'react-native';
|
||||
import type { StyleProp, ViewStyle } from 'react-native';
|
||||
import { Screen, screensEnabled } from 'react-native-screens';
|
||||
import { ResourceSavingView } from '@react-navigation/elements';
|
||||
|
||||
@@ -11,8 +11,7 @@ type Props = {
|
||||
};
|
||||
|
||||
export default function ScreenFallback({ visible, children, ...rest }: Props) {
|
||||
// react-native-screens is buggy on web
|
||||
if (screensEnabled?.() && Platform.OS !== 'web') {
|
||||
if (screensEnabled?.()) {
|
||||
return (
|
||||
<Screen activityState={visible ? 2 : 0} {...rest}>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user