@eohjsc/react-native-smart-city 0.2.63 → 0.2.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.2.63",
4
+ "version": "0.2.64",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -12,7 +12,7 @@ import Routes from '../utils/Route';
12
12
  const Stack = createStackNavigator();
13
13
  const SharedStack = memo(() => {
14
14
  const t = useTranslations();
15
- const navigation = useNavigation();
15
+ const { toggleDrawer, goBack } = useNavigation();
16
16
  const { params } = useRoute();
17
17
  return (
18
18
  <Stack.Navigator>
@@ -21,15 +21,17 @@ const SharedStack = memo(() => {
21
21
  component={Shared}
22
22
  options={{
23
23
  title: t('text_shared_with_me'),
24
- headerLeft: () =>
25
- params?.isMainSource && (
26
- <TouchableOpacity
27
- style={styles.btnMenu}
28
- onPress={() => navigation.toggleDrawer()}
29
- >
30
- <Icon name={'menu'} color={Colors.Black} />
31
- </TouchableOpacity>
32
- ),
24
+ headerLeft: () => (
25
+ <TouchableOpacity
26
+ style={styles.btnMenu}
27
+ onPress={() => (params?.isMainSource ? toggleDrawer() : goBack())}
28
+ >
29
+ <Icon
30
+ name={params?.isMainSource ? 'menu' : 'arrow-left'}
31
+ color={Colors.Black}
32
+ />
33
+ </TouchableOpacity>
34
+ ),
33
35
  headerTitleAlign: 'left',
34
36
  headerStyle: {
35
37
  backgroundColor: Colors.Gray2,
@@ -1,10 +1,15 @@
1
- import { StyleSheet } from 'react-native';
1
+ import { StyleSheet, StatusBar, Platform } from 'react-native';
2
2
  import { Colors } from '../../configs';
3
3
 
4
4
  export default StyleSheet.create({
5
5
  wrap: {
6
6
  flex: 1,
7
7
  backgroundColor: Colors.Gray2,
8
+ ...Platform.select({
9
+ android: {
10
+ paddingTop: StatusBar.currentHeight,
11
+ },
12
+ }),
8
13
  },
9
14
  textHeader: {
10
15
  marginTop: 16,
@@ -159,4 +159,7 @@ export default StyleSheet.create({
159
159
  paddingRight4: {
160
160
  paddingRight: 4,
161
161
  },
162
+ flex1: {
163
+ flex: 1,
164
+ },
162
165
  });
@@ -269,7 +269,12 @@ const ScriptDetail = ({ route }) => {
269
269
  >
270
270
  {item?.unit_name}
271
271
  </Text>
272
- <Text numberOfLines={1} type="Label" color={Colors.Gray7}>
272
+ <Text
273
+ numberOfLines={1}
274
+ type="Label"
275
+ color={Colors.Gray7}
276
+ style={styles.flex1}
277
+ >
273
278
  {item?.station_name}
274
279
  </Text>
275
280
  </View>
@@ -260,6 +260,7 @@ const UnitDetail = ({ route }) => {
260
260
  isOwner={isOwner}
261
261
  favorites={favorites}
262
262
  wrapItemStyle={styles.wrapItemStyle}
263
+ isGGHomeConnected={isGGHomeConnected}
263
264
  />
264
265
  );
265
266
  }