Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit 36e531e

Browse files
committed
Remove now unnecessary things
1 parent 3729294 commit 36e531e

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-navigation-addon-search-layout",
3-
"version": "0.10.0",
3+
"version": "0.11.0",
44
"main": "index.js",
55
"license": "MIT",
66
"dependencies": {

src/Header.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,13 @@ import { Animated, Dimensions, Platform, StyleSheet, View } from 'react-native';
33
import { withNavigation, HeaderBackButton } from 'react-navigation';
44
import { Constants } from 'expo';
55

6-
const X_WIDTH = 375;
7-
const X_HEIGHT = 812;
8-
const { height: D_HEIGHT, width: D_WIDTH } = Dimensions.get('window');
9-
const isIPhoneX =
10-
Platform.OS === 'ios' && (D_HEIGHT === X_HEIGHT && D_WIDTH === X_WIDTH);
11-
12-
const NOTCH_HEIGHT = isIPhoneX ? 20 : 0;
136
const APPBAR_HEIGHT = Platform.OS === 'ios' ? 50 : 56;
147
const STATUSBAR_HEIGHT = Constants.statusBarHeight;
158
const TITLE_OFFSET = Platform.OS === 'ios' ? 70 : 56;
169

1710
@withNavigation
1811
export default class Header extends React.PureComponent {
19-
static HEIGHT = APPBAR_HEIGHT + STATUSBAR_HEIGHT + NOTCH_HEIGHT;
12+
static HEIGHT = APPBAR_HEIGHT + STATUSBAR_HEIGHT;
2013

2114
_navigateBack = () => {
2215
this.props.navigation.goBack(null);
@@ -79,8 +72,8 @@ if (Platform.OS === 'ios') {
7972
const styles = StyleSheet.create({
8073
container: {
8174
backgroundColor: '#fff',
82-
paddingTop: STATUSBAR_HEIGHT + NOTCH_HEIGHT,
83-
height: STATUSBAR_HEIGHT + APPBAR_HEIGHT + NOTCH_HEIGHT,
75+
paddingTop: STATUSBAR_HEIGHT,
76+
height: STATUSBAR_HEIGHT + APPBAR_HEIGHT,
8477
...platformContainerStyles,
8578
},
8679
appBar: {

0 commit comments

Comments
 (0)