Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6db8bcf

Browse files
committed
chore: rm warnings by follow hint
1 parent027a9e4 commit6db8bcf

File tree

6 files changed

+117
-51
lines changed

6 files changed

+117
-51
lines changed

‎.agignore‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
./node_modules/**/*
2+
.expo/*
3+
npm-debug.*
4+
*.jks
5+
*.p12
6+
*.key
7+
*.mobileprovision
8+
yarn.lock

‎App.js‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
importReactfrom'react';
2-
import{Platform,StatusBar,StyleSheet,View}from'react-native';
3-
import{AppLoading,Asset,Font,Icon}from'expo';
4-
importAppNavigatorfrom'./navigation/AppNavigator';
1+
importReactfrom'react'
2+
import{Platform,StatusBar,StyleSheet,View}from'react-native'
3+
import{AppLoading}from'expo'
4+
import{Asset}from'expo-asset'
5+
import*asFontfrom'expo-font'
6+
import*asIconfrom'@expo/vector-icons'
7+
importAppNavigatorfrom'./navigation/AppNavigator'
58

69
exportdefaultclassAppextendsReact.Component{
710
state={
811
isLoadingComplete:false,
9-
};
12+
}
1013

1114
render(){
1215
if(!this.state.isLoadingComplete&&!this.props.skipLoadingScreen){
@@ -16,14 +19,14 @@ export default class App extends React.Component {
1619
onError={this._handleLoadingError}
1720
onFinish={this._handleFinishLoading}
1821
/>
19-
);
22+
)
2023
}else{
2124
return(
2225
<Viewstyle={styles.container}>
2326
{Platform.OS==='ios'&&<StatusBarbarStyle="default"/>}
2427
<AppNavigator/>
2528
</View>
26-
);
29+
)
2730
}
2831
}
2932

@@ -40,23 +43,23 @@ export default class App extends React.Component {
4043
// to remove this if you are not using it in your app
4144
'space-mono':require('./assets/fonts/SpaceMono-Regular.ttf'),
4245
}),
43-
]);
44-
};
46+
])
47+
}
4548

4649
_handleLoadingError=error=>{
4750
// In this case, you might want to report the error to your error
4851
// reporting service, for example Sentry
49-
console.warn(error);
50-
};
52+
console.warn(error)
53+
}
5154

5255
_handleFinishLoading=()=>{
53-
this.setState({isLoadingComplete:true});
54-
};
56+
this.setState({isLoadingComplete:true})
57+
}
5558
}
5659

5760
conststyles=StyleSheet.create({
5861
container:{
5962
flex:1,
6063
backgroundColor:'#fff',
6164
},
62-
});
65+
})

‎components/TabBarIcon.js‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
importReactfrom'react';
2-
import{Icon}from'expo';
1+
importReactfrom'react'
2+
import*asIconfrom'@expo/vector-icons'
33

4-
importColorsfrom'../constants/Colors';
4+
importColorsfrom'../constants/Colors'
55

66
exportdefaultclassTabBarIconextendsReact.Component{
77
render(){
@@ -10,8 +10,10 @@ export default class TabBarIcon extends React.Component {
1010
name={this.props.name}
1111
size={26}
1212
style={{marginBottom:-3}}
13-
color={this.props.focused ?Colors.tabIconSelected :Colors.tabIconDefault}
13+
color={
14+
this.props.focused ?Colors.tabIconSelected :Colors.tabIconDefault
15+
}
1416
/>
15-
);
17+
)
1618
}
17-
}
19+
}

‎package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
},
1313
"dependencies": {
1414
"@expo/samples":"2.1.1",
15+
"@expo/vector-icons":"^9.0.0",
1516
"expo":"^33.0.0",
17+
"expo-asset":"^5.0.1",
18+
"expo-font":"~5.0.1",
1619
"react":"16.8.3",
1720
"react-native":"https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
1821
"react-navigation":"^3.11.0"

‎screens/HomeScreen.js‎

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importReactfrom'react';
1+
importReactfrom'react'
22
import{
33
Image,
44
Platform,
@@ -7,20 +7,23 @@ import {
77
Text,
88
TouchableOpacity,
99
View,
10-
}from'react-native';
11-
import{WebBrowser}from'expo';
10+
}from'react-native'
11+
import{WebBrowser}from'expo'
1212

13-
import{MonoText}from'../components/StyledText';
13+
import{MonoText}from'../components/StyledText'
1414

1515
exportdefaultclassHomeScreenextendsReact.Component{
1616
staticnavigationOptions={
1717
header:null,
18-
};
18+
}
1919

2020
render(){
2121
return(
2222
<Viewstyle={styles.container}>
23-
<ScrollViewstyle={styles.container}contentContainerStyle={styles.contentContainer}>
23+
<ScrollView
24+
style={styles.container}
25+
contentContainerStyle={styles.contentContainer}
26+
>
2427
<Viewstyle={styles.welcomeContainer}>
2528
<Image
2629
source={
@@ -35,33 +38,44 @@ export default class HomeScreen extends React.Component {
3538
<Viewstyle={styles.getStartedContainer}>
3639
{this._maybeRenderDevelopmentModeWarning()}
3740

38-
<Textstyle={styles.getStartedText}>Get started by opening</Text>
41+
<Textstyle={styles.getStartedText}>CPS 客户端</Text>
3942

40-
<Viewstyle={[styles.codeHighlightContainer,styles.homeScreenFilename]}>
41-
<MonoTextstyle={styles.codeHighlightText}>screens/HomeScreen.js</MonoText>
43+
<View
44+
style={[styles.codeHighlightContainer,styles.homeScreenFilename]}
45+
>
46+
<MonoTextstyle={styles.codeHighlightText}>
47+
screens/HomeScreen.js
48+
</MonoText>
4249
</View>
43-
44-
<Textstyle={styles.getStartedText}>
45-
Change this text and your app will automatically reload.
46-
</Text>
4750
</View>
4851

4952
<Viewstyle={styles.helpContainer}>
50-
<TouchableOpacityonPress={this._handleHelpPress}style={styles.helpLink}>
51-
<Textstyle={styles.helpLinkText}>Help, it didn’t automatically reload!</Text>
53+
<TouchableOpacity
54+
onPress={this._handleHelpPress}
55+
style={styles.helpLink}
56+
>
57+
<Textstyle={styles.helpLinkText}>
58+
Help, it didn’t automatically reload!
59+
</Text>
5260
</TouchableOpacity>
5361
</View>
5462
</ScrollView>
5563

5664
<Viewstyle={styles.tabBarInfoContainer}>
57-
<Textstyle={styles.tabBarInfoText}>This is a tab bar. You can edit it in:</Text>
65+
<Textstyle={styles.tabBarInfoText}>
66+
This is a tab bar. You can edit it in:
67+
</Text>
5868

59-
<Viewstyle={[styles.codeHighlightContainer,styles.navigationFilename]}>
60-
<MonoTextstyle={styles.codeHighlightText}>navigation/MainTabNavigator.js</MonoText>
69+
<View
70+
style={[styles.codeHighlightContainer,styles.navigationFilename]}
71+
>
72+
<MonoTextstyle={styles.codeHighlightText}>
73+
navigation/MainTabNavigator.js
74+
</MonoText>
6175
</View>
6276
</View>
6377
</View>
64-
);
78+
)
6579
}
6680

6781
_maybeRenderDevelopmentModeWarning(){
@@ -70,32 +84,34 @@ export default class HomeScreen extends React.Component {
7084
<TextonPress={this._handleLearnMorePress}style={styles.helpLinkText}>
7185
Learn more
7286
</Text>
73-
);
87+
)
7488

7589
return(
7690
<Textstyle={styles.developmentModeText}>
77-
Development mode is enabled, your app will be slower but you can use useful development
78-
tools.{learnMoreButton}
91+
Development mode is enabled, your app will be slower but you can use
92+
useful developmenttools.{learnMoreButton}
7993
</Text>
80-
);
94+
)
8195
}else{
8296
return(
8397
<Textstyle={styles.developmentModeText}>
8498
You are not in development mode, your app will run at full speed.
8599
</Text>
86-
);
100+
)
87101
}
88102
}
89103

90104
_handleLearnMorePress=()=>{
91-
WebBrowser.openBrowserAsync('https://docs.expo.io/versions/latest/guides/development-mode');
92-
};
105+
WebBrowser.openBrowserAsync(
106+
'https://docs.expo.io/versions/latest/guides/development-mode'
107+
)
108+
}
93109

94110
_handleHelpPress=()=>{
95111
WebBrowser.openBrowserAsync(
96112
'https://docs.expo.io/versions/latest/guides/up-and-running.html#can-t-see-your-changes'
97-
);
98-
};
113+
)
114+
}
99115
}
100116

101117
conststyles=StyleSheet.create({
@@ -142,6 +158,7 @@ const styles = StyleSheet.create({
142158
},
143159
getStartedText:{
144160
fontSize:17,
161+
fontWeight:'bold',
145162
color:'rgba(96,100,109, 1)',
146163
lineHeight:24,
147164
textAlign:'center',
@@ -185,4 +202,4 @@ const styles = StyleSheet.create({
185202
fontSize:14,
186203
color:'#2e78b7',
187204
},
188-
});
205+
})

‎yarn.lock‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,13 @@
773773
dependencies:
774774
lodash "^4.17.4"
775775

776+
"@expo/vector-icons@^9.0.0":
777+
version "9.0.0"
778+
resolved "https://registry.npmjs.org/@expo/vector-icons/-/vector-icons-9.0.0.tgz#7f18e21d3edc8b99b76d7d1b8e26b212393e08b3"
779+
dependencies:
780+
lodash "^4.17.4"
781+
react-native-vector-icons "6.0.0"
782+
776783
"@expo/websql@^1.0.1":
777784
version "1.0.1"
778785
resolved "https://registry.npmjs.org/@expo/websql/-/websql-1.0.1.tgz#fff0cf9c1baa1f70f9e1d658b7c39a420d9b10a9"
@@ -2202,7 +2209,7 @@ expo-app-loader-provider@~5.0.1:
22022209
version "5.0.1"
22032210
resolved "https://registry.npmjs.org/expo-app-loader-provider/-/expo-app-loader-provider-5.0.1.tgz#56f531e189de8407bdf257d5753ccec43dd253f7"
22042211

2205-
expo-asset@~5.0.1:
2212+
expo-asset@^5.0.1, expo-asset@~5.0.1:
22062213
version "5.0.1"
22072214
resolved "https://registry.npmjs.org/expo-asset/-/expo-asset-5.0.1.tgz#02445aeb695b8449cb7239e11fc3a8d34e6c86ce"
22082215
dependencies:
@@ -3908,7 +3915,7 @@ lodash.throttle@^4.1.1:
39083915
version "4.1.1"
39093916
resolved "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
39103917

3911-
lodash@^4.16.2, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.0, lodash@^4.6.1:
3918+
lodash@^4.0.0, lodash@^4.16.2, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.0, lodash@^4.6.1:
39123919
version "4.17.11"
39133920
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
39143921

@@ -5158,6 +5165,14 @@ react-native-tab-view@^1.4.1:
51585165
dependencies:
51595166
prop-types "^15.6.1"
51605167

5168+
react-native-vector-icons@6.0.0:
5169+
version "6.0.0"
5170+
resolved "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.0.0.tgz#3a7076dbe244ea94c6d5e92802a870e64a4283c5"
5171+
dependencies:
5172+
lodash "^4.0.0"
5173+
prop-types "^15.6.2"
5174+
yargs "^8.0.2"
5175+
51615176
react-native-view-shot@2.6.0:
51625177
version "2.6.0"
51635178
resolved "https://registry.npmjs.org/react-native-view-shot/-/react-native-view-shot-2.6.0.tgz#3b23675826f67658366352c4b97b59a6aded2f43"
@@ -6463,6 +6478,24 @@ yargs@^12.0.2:
64636478
y18n "^3.2.1 || ^4.0.0"
64646479
yargs-parser "^11.1.1"
64656480

6481+
yargs@^8.0.2:
6482+
version "8.0.2"
6483+
resolved "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
6484+
dependencies:
6485+
camelcase "^4.1.0"
6486+
cliui "^3.2.0"
6487+
decamelize "^1.1.1"
6488+
get-caller-file "^1.0.1"
6489+
os-locale "^2.0.0"
6490+
read-pkg-up "^2.0.0"
6491+
require-directory "^2.1.1"
6492+
require-main-filename "^1.0.1"
6493+
set-blocking "^2.0.0"
6494+
string-width "^2.0.0"
6495+
which-module "^2.0.0"
6496+
y18n "^3.2.1"
6497+
yargs-parser "^7.0.0"
6498+
64666499
yargs@^9.0.0:
64676500
version "9.0.1"
64686501
resolved "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp