-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33152 from kubabutkiewicz/ts-migration/WorkspaceI…
…nvoices/page [TS migration] Migrate 'WorkspaceInvoices' page to TypeScript
- Loading branch information
Showing
5 changed files
with
49 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 11 additions & 13 deletions
24
...ce/invoices/WorkspaceInvoicesNoVBAView.js → ...e/invoices/WorkspaceInvoicesNoVBAView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,43 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import ConnectBankAccountButton from '@components/ConnectBankAccountButton'; | ||
import * as Illustrations from '@components/Icon/Illustrations'; | ||
import Section from '@components/Section'; | ||
import Text from '@components/Text'; | ||
import withLocalize, {withLocalizePropTypes} from '@components/withLocalize'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import WorkspaceInvoicesFirstSection from './WorkspaceInvoicesFirstSection'; | ||
|
||
const propTypes = { | ||
type WorkspaceInvoicesNoVBAViewProps = { | ||
/** The policy ID currently being configured */ | ||
policyID: PropTypes.string.isRequired, | ||
|
||
...withLocalizePropTypes, | ||
policyID: string; | ||
}; | ||
|
||
function WorkspaceInvoicesNoVBAView(props) { | ||
function WorkspaceInvoicesNoVBAView({policyID}: WorkspaceInvoicesNoVBAViewProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<> | ||
<WorkspaceInvoicesFirstSection policyID={props.policyID} /> | ||
<WorkspaceInvoicesFirstSection policyID={policyID} /> | ||
|
||
<Section | ||
title={props.translate('workspace.invoices.unlockOnlineInvoiceCollection')} | ||
title={translate('workspace.invoices.unlockOnlineInvoiceCollection')} | ||
icon={Illustrations.MoneyIntoWallet} | ||
containerStyles={[styles.cardSection]} | ||
> | ||
<View style={[styles.mv3]}> | ||
<Text>{props.translate('workspace.invoices.unlockNoVBACopy')}</Text> | ||
<Text>{translate('workspace.invoices.unlockNoVBACopy')}</Text> | ||
</View> | ||
<ConnectBankAccountButton | ||
policyID={props.policyID} | ||
policyID={policyID} | ||
style={[styles.mt4]} | ||
/> | ||
</Section> | ||
</> | ||
); | ||
} | ||
|
||
WorkspaceInvoicesNoVBAView.propTypes = propTypes; | ||
WorkspaceInvoicesNoVBAView.displayName = 'WorkspaceInvoicesNoVBAView'; | ||
|
||
export default withLocalize(WorkspaceInvoicesNoVBAView); | ||
export default WorkspaceInvoicesNoVBAView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters