use logo, website and emai in purchase details

This commit is contained in:
Sebastian 2022-05-29 01:42:35 -03:00
parent 029340469a
commit 64488a5593
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
3 changed files with 40 additions and 2 deletions

View File

@ -58,7 +58,7 @@ const commonTransaction = {
transactionId: "12", transactionId: "12",
} as TransactionCommon; } as TransactionCommon;
import merchantIcon from "../../static-dev/merchant-icon-11.jpeg"; import merchantIcon from "../../static-dev/merchant-icon.jpeg";
const exampleData = { const exampleData = {
withdraw: { withdraw: {

View File

@ -396,7 +396,45 @@ export function TransactionView({
)} )}
<Part <Part
title={<i18n.Translate>Merchant</i18n.Translate>} title={<i18n.Translate>Merchant</i18n.Translate>}
text={transaction.info.merchant.name} text={
<Fragment>
<div style={{ display: "flex", flexDirection: "row" }}>
{transaction.info.merchant.logo && (
<div>
<img
src={transaction.info.merchant.logo}
style={{ width: 64, height: 64, margin: 4 }}
/>
</div>
)}
<div>
<p>{transaction.info.merchant.name}</p>
{transaction.info.merchant.website && (
<a
href={transaction.info.merchant.website}
target="_blank"
style={{ textDecorationColor: "gray" }}
rel="noreferrer"
>
<SmallLightText>
{transaction.info.merchant.website}
</SmallLightText>
</a>
)}
{transaction.info.merchant.email && (
<a
href={`mailto:${transaction.info.merchant.email}`}
style={{ textDecorationColor: "gray" }}
>
<SmallLightText>
{transaction.info.merchant.email}
</SmallLightText>
</a>
)}
</div>
</div>
</Fragment>
}
kind="neutral" kind="neutral"
/> />
<Part <Part

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB