Fixed build issues, defaultProps (#461)

This commit is contained in:
Seph Soliman 2022-04-08 10:43:59 -07:00 committed by GitHub
parent 73b1110f90
commit ce1e83c202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

10
.eslintignore Normal file
View File

@ -0,0 +1,10 @@
example/
dist/
images/
ios/
android/
assets/
.vscode/
.github/
/.eslintrc.js
/metro.config.js

View File

@ -9,7 +9,7 @@ import {
Dimensions,
Platform,
SafeAreaView,
ImageStyle
ImageStyle,
} from 'react-native';
import _ from 'lodash';
import Camera from './Camera';
@ -69,6 +69,7 @@ export default class CameraScreen extends Component<Props, State> {
static defaultProps = {
allowCaptureRetake: false,
saveToCameraRoll: true,
};
currentFlashArrayPosition: number;
@ -197,7 +198,7 @@ export default class CameraScreen extends Component<Props, State> {
laserColor={this.props.laserColor}
frameColor={this.props.frameColor}
onReadCode={this.props.onReadCode}
/>
)}
</View>
@ -221,7 +222,11 @@ export default class CameraScreen extends Component<Props, State> {
!this.isCaptureRetakeMode() && (
<View style={styles.captureButtonContainer}>
<TouchableOpacity onPress={() => this.onCaptureImagePressed()}>
<Image source={this.props.captureButtonImage} style={this.props.captureButtonImageStyle} resizeMode="contain" />
<Image
source={this.props.captureButtonImage}
style={this.props.captureButtonImageStyle}
resizeMode="contain"
/>
{this.props.showCapturedImageCount && (
<View style={styles.textNumberContainer}>
<Text>{this.numberOfImagesTaken()}</Text>
@ -349,11 +354,6 @@ export default class CameraScreen extends Component<Props, State> {
}
}
CameraScreen.defaultProps = {
saveToCameraRoll: true
}
const styles = StyleSheet.create(
{
bottomButtons: {