Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed build issues, defaultProps #461

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
example/
dist/
images/
ios/
android/
assets/
.vscode/
.github/
/.eslintrc.js
/metro.config.js
16 changes: 8 additions & 8 deletions src/CameraScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Dimensions,
Platform,
SafeAreaView,
ImageStyle
ImageStyle,
} from 'react-native';
import _ from 'lodash';
import Camera from './Camera';
Expand Down Expand Up @@ -69,6 +69,7 @@ export default class CameraScreen extends Component<Props, State> {

static defaultProps = {
allowCaptureRetake: false,
saveToCameraRoll: true,
};

currentFlashArrayPosition: number;
Expand Down Expand Up @@ -197,7 +198,7 @@ export default class CameraScreen extends Component<Props, State> {
laserColor={this.props.laserColor}
frameColor={this.props.frameColor}
onReadCode={this.props.onReadCode}

scarlac marked this conversation as resolved.
Show resolved Hide resolved
/>
)}
</View>
Expand All @@ -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>
Expand Down Expand Up @@ -349,11 +354,6 @@ export default class CameraScreen extends Component<Props, State> {
}
}


CameraScreen.defaultProps = {
saveToCameraRoll: true
}

const styles = StyleSheet.create(
{
bottomButtons: {
Expand Down