Skip to content

Commit 7c5480d

Browse files
committed
style: Fix lint errors
1 parent 40bb40f commit 7c5480d

3 files changed

Lines changed: 13 additions & 18 deletions

File tree

src/components/CopilotModal.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import React, { Component } from 'react';
3-
import { Animated, Easing, View, Text, NativeModules, Modal, StatusBar, Platform } from 'react-native';
3+
import { Animated, Easing, View, NativeModules, Modal, StatusBar, Platform } from 'react-native';
44
import Tooltip from './Tooltip';
55
import StepNumber from './StepNumber';
66
import styles, { MARGIN, ARROW_SIZE, STEP_NUMBER_DIAMETER, STEP_NUMBER_RADIUS } from './style';
@@ -238,7 +238,10 @@ class CopilotModal extends Component<Props, State> {
238238
}
239239

240240
renderTooltip() {
241-
const { tooltipComponent: TooltipComponent, stepNumberComponent: StepNumberComponent } = this.props;
241+
const {
242+
tooltipComponent: TooltipComponent,
243+
stepNumberComponent: StepNumberComponent,
244+
} = this.props;
242245

243246
return [
244247
<Animated.View

src/components/StepNumber.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,11 @@ import { View, Text } from 'react-native';
44

55
import styles from './style';
66

7-
import type { Step } from '../types';
8-
97
type Props = {
10-
isFirstStep: boolean,
11-
isLastStep: boolean,
12-
currentStep: Step,
138
currentStepNumber: number,
149
};
1510

1611
const StepNumber = ({
17-
isFirstStep,
18-
isLastStep,
19-
currentStep,
2012
currentStepNumber,
2113
}: Props) => (
2214
<View style={styles.stepNumber}>

src/hocs/copilot.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ const copilot = ({
5151
};
5252
}
5353

54+
componentDidMount() {
55+
this.mounted = true;
56+
}
57+
58+
componentWillUnmount() {
59+
this.mounted = false;
60+
}
61+
5462
getStepNumber = (step: ?Step = this.state.currentStep): number =>
5563
getStepNumber(this.state.steps, step);
5664

@@ -155,14 +163,6 @@ const copilot = ({
155163
});
156164
}
157165

158-
componentDidMount() {
159-
this.mounted = true;
160-
}
161-
162-
componentWillUnmount() {
163-
this.mounted = false;
164-
}
165-
166166
render() {
167167
return (
168168
<View style={{ flex: 1 }}>

0 commit comments

Comments
 (0)