Skip to content

Commit

Permalink
code refactor to conform to eslint rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklam718 committed Jan 8, 2017
1 parent 47fdc3c commit 9de4eee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/components/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ class Dialog extends Component {
const dialogState = this.state.dialogState;
const overlayPointerEvents = this.pointerEvents;
const isShowOverlay = (['opened', 'opening'].includes(dialogState) && this.props.haveOverlay);
const dimensions = {width: Dimensions.get('window').width, height: Dimensions.get('window').height};
const dimensions = {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
};

if (dialogState === 'closed') {
hidden = styles.hidden;
Expand Down
7 changes: 4 additions & 3 deletions src/components/Overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import React, { Component } from 'react';
import { StyleSheet, Dimensions, TouchableOpacity, Animated } from 'react-native';

const { width: WIDTH, height: HEIGHT } = Dimensions.get('window');

type Props = {
onPress: Function;
backgroundColor: string;
Expand Down Expand Up @@ -46,7 +44,10 @@ class Overlay extends Component {
const { onPress, pointerEvents } = this.props;
const backgroundColor = { backgroundColor: this.props.backgroundColor };
const opacity = { opacity: this.state.opacity };
const dimensions = {width: Dimensions.get('window').width, height: Dimensions.get('window').height }
const dimensions = {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
};

return (
<Animated.View
Expand Down

0 comments on commit 9de4eee

Please sign in to comment.