-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TS Migration] Migrate WorkspaceCard to Typescript #34963
Merged
madmax330
merged 11 commits into
Expensify:main
from
ruben-rebelo:ts-migration/WorkspaceCard
Feb 12, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
35c6ca5
[TS Migration] Migrate WorkspaceCard to Typescript
ruben-rebelo 136cf97
[TS migration] WorkspaceCard ts fix
ruben-rebelo 04eff8e
[TS migration] WorkspaceCardPage ts fix
ruben-rebelo ea1d37b
[TS migration] WorkspaceCard code improvements
ruben-rebelo 71d6e39
[TS migration] Lint fix
ruben-rebelo ee51cfc
[TS migration][WorkspaceCard] Added withPolicy Route fix
ruben-rebelo 74051cb
Merge branch 'main' into ts-migration/WorkspaceCard
ruben-rebelo c27c85a
[TS migration][WorkspaceCard] Ts fix
ruben-rebelo b7abae0
Merge branch 'main' into ts-migration/WorkspaceCard
ruben-rebelo 03222ab
[TS migration][WorkspaceCard] Addressed feedback
ruben-rebelo 997b4d4
[TS migration][WorkspaceCard] Prettified
ruben-rebelo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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 UnorderedList from '@components/UnorderedList'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
||
type WorkspaceCardNoVBAViewProps = { | ||
/** The policy ID currently being configured */ | ||
policyID: string; | ||
}; | ||
|
||
function WorkspaceCardNoVBAView({policyID}: WorkspaceCardNoVBAViewProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
const unorderedListItems = [translate('workspace.card.benefit1'), translate('workspace.card.benefit2'), translate('workspace.card.benefit3'), translate('workspace.card.benefit4')]; | ||
|
||
return ( | ||
<Section | ||
title={translate('workspace.card.header')} | ||
icon={Illustrations.CreditCardsNew} | ||
isCentralPane | ||
> | ||
<View style={[styles.mv4]}> | ||
<Text>{translate('workspace.card.noVBACopy')}</Text> | ||
</View> | ||
|
||
<UnorderedList items={unorderedListItems} /> | ||
<ConnectBankAccountButton | ||
policyID={policyID} | ||
style={[styles.mt6]} | ||
/> | ||
</Section> | ||
); | ||
} | ||
|
||
WorkspaceCardNoVBAView.displayName = 'WorkspaceCardNoVBAView'; | ||
|
||
export default WorkspaceCardNoVBAView; |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isCentralPane
prop is removed. Was this intentional change?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not intentional, I've added the prop again. Thanks for pointing that out!