Skip to content
Merged
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
67 changes: 33 additions & 34 deletions src/pages/workspace/WorkspaceBankAccountPage.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import lodashGet from 'lodash/get';
import React from 'react';
import {withOnyx} from 'react-native-onyx';
import HeaderWithCloseButton from '../../components/HeaderWithCloseButton';
import * as Expensicons from '../../components/Icon/Expensicons';
import * as Illustrations from '../../components/Icon/Illustrations';
import ScreenWrapper from '../../components/ScreenWrapper';
import ExpensifyText from '../../components/ExpensifyText';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
import * as BankAccounts from '../../libs/actions/BankAccounts';
Expand All @@ -14,8 +16,6 @@ import ROUTES from '../../ROUTES';
import reimbursementAccountPropTypes from '../ReimbursementAccount/reimbursementAccountPropTypes';
import WorkspaceSection from './WorkspaceSection';
import WorkspaceResetBankAccountModal from './WorkspaceResetBankAccountModal';
import WorkspacePageWithSections from './WorkspacePageWithSections';


const propTypes = {
/** ACH data for the withdrawal account actively being set up */
Expand Down Expand Up @@ -85,38 +85,37 @@ class WorkspaceBankAccountPage extends React.Component {
}

return (
<WorkspacePageWithSections
headerText={this.props.translate('workspace.common.bankAccount')}
route={this.props.route}
>
{() => (
<>
<WorkspaceSection
title={this.props.translate('workspace.bankAccount.almostDone')}
icon={Illustrations.BankArrowPink}
menuItems={[
{
title: this.props.translate('workspace.bankAccount.continueWithSetup'),
icon: Expensicons.Bank,
onPress: this.navigateToBankAccountRoute,
shouldShowRightIcon: true,
},
{
title: this.props.translate('workspace.bankAccount.startOver'),
icon: Expensicons.RotateLeft,
onPress: BankAccounts.requestResetFreePlanBankAccount,
shouldShowRightIcon: true,
},
]}
>
<ExpensifyText>
{this.props.translate('workspace.bankAccount.youreAlmostDone')}
</ExpensifyText>
</WorkspaceSection>
<WorkspaceResetBankAccountModal />
</>
)}
</WorkspacePageWithSections>
<ScreenWrapper>
<HeaderWithCloseButton
title={this.props.translate('workspace.common.bankAccount')}
onCloseButtonPress={Navigation.dismissModal}
onBackButtonPress={() => Navigation.navigate(ROUTES.getWorkspaceInitialRoute(this.props.route.params.policyID))}
shouldShowBackButton
/>
<WorkspaceSection
title={this.props.translate('workspace.bankAccount.almostDone')}
icon={Illustrations.BankArrowPink}
menuItems={[
{
title: this.props.translate('workspace.bankAccount.continueWithSetup'),
icon: Expensicons.Bank,
onPress: this.navigateToBankAccountRoute,
shouldShowRightIcon: true,
},
{
title: this.props.translate('workspace.bankAccount.startOver'),
icon: Expensicons.RotateLeft,
onPress: BankAccounts.requestResetFreePlanBankAccount,
shouldShowRightIcon: true,
},
]}
>
<ExpensifyText>
{this.props.translate('workspace.bankAccount.youreAlmostDone')}
</ExpensifyText>
</WorkspaceSection>
<WorkspaceResetBankAccountModal />
</ScreenWrapper>
);
}
}
Expand Down