Skip to content

Commit

Permalink
Remove need for platform overrides in SafeAreaView.js
Browse files Browse the repository at this point in the history
Summary:
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

Differential Revision: D47734944

fbshipit-source-id: be406131ae59de53e419c1f86816e5b9975142f2
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Jul 24, 2023
1 parent 75f4588 commit 8c6a264
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 8c6a264

Please sign in to comment.