mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove need for platform overrides in SafeAreaView.js (#38601)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38601 This file is forked in out of tree platforms as: - macOS > https://github.com/microsoft/react-native-macos/blob/main/Libraries/Components/SafeAreaView/SafeAreaView.js#L28-L33 - Windows > https://github.com/microsoft/react-native-windows/blob/0.71-stable/vnext/src/Libraries/Components/SafeAreaView/SafeAreaView.windows.js#L30-L36 The change here removes the need of forking this file Changelog: [General] [Fixed] - [SafeAreaView] Remove need for platform overrides in SafeAreaView.js Reviewed By: NickGerleman Differential Revision: D47734944 fbshipit-source-id: 84249a3b3e7e3807b3d5ee4bfa4b1cb140541b8b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5cf66bda1d
commit
80f531f9f4
@@ -25,10 +25,9 @@ let exported: React.AbstractComponent<ViewProps, React.ElementRef<typeof View>>;
|
||||
* limitation of the screen, such as rounded corners or camera notches (aka
|
||||
* sensor housing area on iPhone X).
|
||||
*/
|
||||
if (Platform.OS === 'android') {
|
||||
exported = View;
|
||||
} else {
|
||||
exported = require('./RCTSafeAreaViewNativeComponent').default;
|
||||
}
|
||||
exported = Platform.select({
|
||||
ios: require('./RCTSafeAreaViewNativeComponent').default,
|
||||
default: View,
|
||||
});
|
||||
|
||||
export default exported;
|
||||
|
||||
Reference in New Issue
Block a user