Skip to content

Commit

Permalink
fix: fix typo in invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 authored and CarlLiu2023 committed Aug 15, 2023
1 parent 4adedb1 commit 208227e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions apps/storefront/src/pages/invoice/components/PaymentSuccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ function Row({ isRow = true, type = '', value, label, code }: RowProps) {
const accountValue = handleGetCorrespondingCurrency(code, val)
return accountValue
}
if (type === 'paymentType') {
let val = `${value}`.trim()

if (value) {
val = val.slice(0, 1).toUpperCase() + val.slice(1).toLowerCase()
}

return val
}
return value || '–'
}

Expand Down Expand Up @@ -99,12 +108,12 @@ function PaymentSuccessList({ list }: { list: InvoiceSuccessData }) {
{
key: 'paymentType',
label: 'Payment type',
type: '',
type: 'paymentType',
isRow: true,
},
{
key: 'totalAmount',
label: 'Payment Total',
label: 'Payment total',
type: 'currency',
isRow: true,
},
Expand Down Expand Up @@ -152,7 +161,7 @@ function PaymentSuccessList({ list }: { list: InvoiceSuccessData }) {
>
<Title title="Invoices paid" withColon={false} />
<Typography variant="body1">
Yo made payments towards the invoices shown below{' '}
You made payments towards the invoices shown below{' '}
</Typography>
</Box>

Expand Down

0 comments on commit 208227e

Please sign in to comment.