Skip to content

Commit

Permalink
apply suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Jan 31, 2024
1 parent ef0b1bd commit 0812bb4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/ConnectBankAccountButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ import * as Expensicons from './Icon/Expensicons';
import Text from './Text';

type ConnectBankAccountButtonProps = {
/** PolicyID for navigating to bank account route of that policy */
policyID: string;
style: StyleProp<ViewStyle>;

/** Button styles, also applied for offline message wrapper */
style?: StyleProp<ViewStyle>;
};

function ConnectBankAccountButton({style, policyID}: ConnectBankAccountButtonProps) {
const styles = useThemeStyles();
const {isOffline} = useNetwork();
const {translate} = useLocalize();
const activeRoute = Navigation.getActiveRouteWithoutParams();

return isOffline ? (
<View style={style}>
<Text>{`${translate('common.youAppearToBeOffline')} ${translate('common.thisFeatureRequiresInternet')}`}</Text>
Expand All @@ -31,7 +34,7 @@ function ConnectBankAccountButton({style, policyID}: ConnectBankAccountButtonPro
onPress={() => ReimbursementAccount.navigateToBankAccountRoute(policyID, activeRoute)}
icon={Expensicons.Bank}
style={style}
iconStyles={[styles.buttonCTAIcon]}
iconStyles={styles.buttonCTAIcon}
shouldShowRightIcon
large
success
Expand Down

0 comments on commit 0812bb4

Please sign in to comment.