-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Bonus Pagamenti Digitali): [#175883276] Adds the SatispayCard Wa…
…llet preview (#2456) * [#175883276] Creates the SatispayPreviewCard for wallet * [#175883276] Fixes * Update ts/features/wallet/component/WalletV2PreviewCards.tsx Co-authored-by: Matteo Boschi <[email protected]> * [#175883276] Fixes Co-authored-by: Matteo Boschi <[email protected]>
- Loading branch information
1 parent
b87e4eb
commit 5892971
Showing
2 changed files
with
58 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from "react"; | ||
import { connect } from "react-redux"; | ||
import { Dispatch } from "redux"; | ||
import { nullType } from "io-ts"; | ||
import satispayImage from "../../../../img/wallet/cards-icons/satispay.png"; | ||
import { Body } from "../../../components/core/typography/Body"; | ||
import { IOStyles } from "../../../components/core/variables/IOStyles"; | ||
import I18n from "../../../i18n"; | ||
import { GlobalState } from "../../../store/reducers/types"; | ||
import { CardPreview } from "../component/CardPreview"; | ||
|
||
type Props = ReturnType<typeof mapDispatchToProps> & | ||
ReturnType<typeof mapStateToProps>; | ||
|
||
/** | ||
* A card preview for a bancomat card | ||
* @param props | ||
* @constructor | ||
*/ | ||
const SatispayWalletPreview: React.FunctionComponent<Props> = props => ( | ||
<CardPreview | ||
left={ | ||
<Body style={IOStyles.flex} numberOfLines={1}> | ||
{I18n.t("wallet.methods.satispay.name")} | ||
</Body> | ||
} | ||
image={satispayImage} | ||
onPress={() => props.navigateToSatispayDetails()} | ||
/> | ||
); | ||
|
||
const mapDispatchToProps = (_: Dispatch) => ({ | ||
// TODO replace with correct navigation action | ||
navigateToSatispayDetails: () => nullType | ||
}); | ||
|
||
const mapStateToProps = (_: GlobalState) => ({}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
)(SatispayWalletPreview); |