Skip to content

Commit

Permalink
Prettier done
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajeett01 committed Jun 19, 2024
1 parent d4ec6c8 commit d1bc6d8
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 182 deletions.
35 changes: 18 additions & 17 deletions views/Activity/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class Activity extends React.PureComponent<

state = {
selectedPaymentForOrder: null,
isCsvModalVisible: false,
isCsvModalVisible: false
};

async UNSAFE_componentWillMount() {
Expand Down Expand Up @@ -139,16 +139,16 @@ export default class Activity extends React.PureComponent<
const { ActivityStore } = this.props;
const { startDate, endDate } = ActivityStore.filters;
const { filteredActivity } = ActivityStore;

if (!startDate || !endDate) {
Alert.alert(
'Error',
'Please select Start and End date.',
);
Alert.alert('Error', 'Please select Start and End date.');
} else {
this.setState({ isCsvModalVisible: true, filteredData: filteredActivity });
this.setState({
isCsvModalVisible: true,
filteredData: filteredActivity
});
}
};
};

render() {
const {
Expand All @@ -159,7 +159,7 @@ export default class Activity extends React.PureComponent<
SettingsStore,
route
} = this.props;
const { selectedPaymentForOrder , isCsvModalVisible} = this.state;
const { selectedPaymentForOrder, isCsvModalVisible } = this.state;

const { loading, filteredActivity, getActivityAndFilter } =
ActivityStore;
Expand Down Expand Up @@ -274,21 +274,22 @@ export default class Activity extends React.PureComponent<
selectedPaymentForOrder ? (
<MarkPaymentButton />
) : null
) : (
<FilterButton />
) : (
<FilterButton />
)}
<DownloadButton />
</View>
}
navigation={navigation}
/>

<JsonToCsv
filteredActivity={filteredActivity}
closeModal={() => this.setState({ isCsvModalVisible: false })}
isVisible={isCsvModalVisible}
/>

<JsonToCsv
filteredActivity={filteredActivity}
closeModal={() =>
this.setState({ isCsvModalVisible: false })
}
isVisible={isCsvModalVisible}
/>

{loading ? (
<View style={{ padding: 50 }}>
Expand Down
Loading

0 comments on commit d1bc6d8

Please sign in to comment.