From 7055033d26d49b070c8777a8f8d0deca7b464fa0 Mon Sep 17 00:00:00 2001 From: Nicolas Comont Date: Fri, 1 Dec 2023 14:53:47 +0100 Subject: [PATCH] feat: hide transfer summary edit label on mobile --- .../components/TransferInternationalWizard.tsx | 2 ++ .../TransferInternationalWizardAmount.tsx | 18 ++++++++++++++---- .../src/components/TransferRecurringWizard.tsx | 3 +++ .../TransferRecurringWizardDetails.tsx | 16 +++++++++++++--- .../src/components/TransferRegularWizard.tsx | 3 +++ .../TransferRegularWizardDetails.tsx | 16 +++++++++++++--- .../components/TransferWizardBeneficiary.tsx | 16 +++++++++++++--- clients/banking/src/locales/de.json | 1 - clients/banking/src/locales/en.json | 1 - clients/banking/src/locales/es.json | 1 - clients/banking/src/locales/fr.json | 1 - clients/banking/src/locales/it.json | 1 - clients/banking/src/locales/nl.json | 1 - clients/banking/src/locales/pt.json | 1 - 14 files changed, 61 insertions(+), 20 deletions(-) diff --git a/clients/banking/src/components/TransferInternationalWizard.tsx b/clients/banking/src/components/TransferInternationalWizard.tsx index fc7635ba1..e83af8a3b 100644 --- a/clients/banking/src/components/TransferInternationalWizard.tsx +++ b/clients/banking/src/components/TransferInternationalWizard.tsx @@ -206,6 +206,7 @@ export const TransferInternationalWizard = ({ return ( <> setStep({ name: "Amount", amount })} /> @@ -232,6 +233,7 @@ export const TransferInternationalWizard = ({ return ( <> setStep({ name: "Amount", amount })} /> diff --git a/clients/banking/src/components/TransferInternationalWizardAmount.tsx b/clients/banking/src/components/TransferInternationalWizardAmount.tsx index 26ce2ea4d..0aa859f70 100644 --- a/clients/banking/src/components/TransferInternationalWizardAmount.tsx +++ b/clients/banking/src/components/TransferInternationalWizardAmount.tsx @@ -246,16 +246,21 @@ export const TransferInternationalWizardAmount = ({ type SummaryProps = { amount: Amount; + isMobile: boolean; onPressEdit: () => void; }; -export const TransferInternationamWizardAmountSummary = ({ amount, onPressEdit }: SummaryProps) => { +export const TransferInternationamWizardAmountSummary = ({ + isMobile, + amount, + onPressEdit, +}: SummaryProps) => { return ( - {t("transfer.new.internationalTransfer.amount.summary.title")} + {t("transfer.new.details.summaryTitle")} @@ -267,8 +272,13 @@ export const TransferInternationamWizardAmountSummary = ({ amount, onPressEdit } - - {t("common.edit")} + + {isMobile ? null : t("common.edit")} diff --git a/clients/banking/src/components/TransferRecurringWizard.tsx b/clients/banking/src/components/TransferRecurringWizard.tsx index 3818c0040..5dac0fd13 100644 --- a/clients/banking/src/components/TransferRecurringWizard.tsx +++ b/clients/banking/src/components/TransferRecurringWizard.tsx @@ -220,6 +220,7 @@ export const TransferRecurringWizard = ({ return ( <> setStep({ name: "Beneficiary", beneficiary })} /> @@ -240,6 +241,7 @@ export const TransferRecurringWizard = ({ return ( <> setStep({ name: "Beneficiary", beneficiary })} /> @@ -247,6 +249,7 @@ export const TransferRecurringWizard = ({ setStep({ name: "Details", beneficiary, details })} /> diff --git a/clients/banking/src/components/TransferRecurringWizardDetails.tsx b/clients/banking/src/components/TransferRecurringWizardDetails.tsx index a60a9a3e2..5e415abc9 100644 --- a/clients/banking/src/components/TransferRecurringWizardDetails.tsx +++ b/clients/banking/src/components/TransferRecurringWizardDetails.tsx @@ -471,11 +471,16 @@ export const TransferRecurringWizardDetails = ({ }; type SummaryProps = { + isMobile: boolean; details: Details; onPressEdit: () => void; }; -export const TransferRecurringWizardDetailsSummary = ({ details, onPressEdit }: SummaryProps) => { +export const TransferRecurringWizardDetailsSummary = ({ + isMobile, + details, + onPressEdit, +}: SummaryProps) => { return ( @@ -513,8 +518,13 @@ export const TransferRecurringWizardDetailsSummary = ({ details, onPressEdit }: )) .exhaustive()} - - {t("common.edit")} + + {isMobile ? null : t("common.edit")} diff --git a/clients/banking/src/components/TransferRegularWizard.tsx b/clients/banking/src/components/TransferRegularWizard.tsx index 3393f8044..a45de930c 100644 --- a/clients/banking/src/components/TransferRegularWizard.tsx +++ b/clients/banking/src/components/TransferRegularWizard.tsx @@ -208,6 +208,7 @@ export const TransferRegularWizard = ({ onPressClose, accountId, accountMembersh return ( <> setStep({ name: "Beneficiary", beneficiary })} /> @@ -235,6 +236,7 @@ export const TransferRegularWizard = ({ onPressClose, accountId, accountMembersh return ( <> setStep({ name: "Beneficiary", beneficiary })} /> @@ -242,6 +244,7 @@ export const TransferRegularWizard = ({ onPressClose, accountId, accountMembersh setStep({ name: "Details", beneficiary, details })} /> diff --git a/clients/banking/src/components/TransferRegularWizardDetails.tsx b/clients/banking/src/components/TransferRegularWizardDetails.tsx index 2a35a1e4f..8ea55c627 100644 --- a/clients/banking/src/components/TransferRegularWizardDetails.tsx +++ b/clients/banking/src/components/TransferRegularWizardDetails.tsx @@ -219,10 +219,15 @@ export const TransferRegularWizardDetails = ({ type SummaryProps = { details: Details; + isMobile: boolean; onPressEdit: () => void; }; -export const TransferRegularWizardDetailsSummary = ({ details, onPressEdit }: SummaryProps) => { +export const TransferRegularWizardDetailsSummary = ({ + isMobile, + details, + onPressEdit, +}: SummaryProps) => { return ( @@ -238,8 +243,13 @@ export const TransferRegularWizardDetailsSummary = ({ details, onPressEdit }: Su - - {t("common.edit")} + + {isMobile ? null : t("common.edit")} diff --git a/clients/banking/src/components/TransferWizardBeneficiary.tsx b/clients/banking/src/components/TransferWizardBeneficiary.tsx index 1035c117b..3d71d4478 100644 --- a/clients/banking/src/components/TransferWizardBeneficiary.tsx +++ b/clients/banking/src/components/TransferWizardBeneficiary.tsx @@ -184,10 +184,15 @@ export const TransferWizardBeneficiary = ({ initialBeneficiary, onSave }: Props) type SummaryProps = { beneficiary: Beneficiary; + isMobile: boolean; onPressEdit: () => void; }; -export const TransferWizardBeneficiarySummary = ({ beneficiary, onPressEdit }: SummaryProps) => { +export const TransferWizardBeneficiarySummary = ({ + isMobile, + beneficiary, + onPressEdit, +}: SummaryProps) => { return ( @@ -207,8 +212,13 @@ export const TransferWizardBeneficiarySummary = ({ beneficiary, onPressEdit }: S - - {t("common.edit")} + + {isMobile ? null : t("common.edit")} diff --git a/clients/banking/src/locales/de.json b/clients/banking/src/locales/de.json index 3c19377be..2a4652e4d 100644 --- a/clients/banking/src/locales/de.json +++ b/clients/banking/src/locales/de.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Sie senden genau {amount}", "transfer.new.internationalTransfer.amount.description": "Gesamtbetrag, den wir in {amount} umrechnen (Wechselkurs {rate})", "transfer.new.internationalTransfer.amount.label": "Empfänger erhält", - "transfer.new.internationalTransfer.amount.summary.title": "Sie senden", "transfer.new.internationalTransfer.amount.title": "Geben Sie Details zu Ihrer Überweisung ein", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "Der Wert entspricht nicht dem erwarteten Muster", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "Der Wert entspricht nicht dem erwarteten Muster (Beispiel: {example})", diff --git a/clients/banking/src/locales/en.json b/clients/banking/src/locales/en.json index 830eee152..e2d5d0d26 100644 --- a/clients/banking/src/locales/en.json +++ b/clients/banking/src/locales/en.json @@ -729,7 +729,6 @@ "transfer.new.sendRegularTransfer.description": "You will send a regular standing order", "transfer.new.internationalTransfer.title": "New international transfer", "transfer.new.internationalTransfer.amount.title": "Enter details about your transfer", - "transfer.new.internationalTransfer.amount.summary.title": "You're sending", "transfer.new.internationalTransfer.amount.label": "Beneficiary gets", "transfer.new.internationalTransfer.amount.description": "Total amount we'll convert {amount} (Exchange rate {rate})", "transfer.new.internationalTransfer.fee": "Transfer fee {fee}", diff --git a/clients/banking/src/locales/es.json b/clients/banking/src/locales/es.json index 742597519..6aaa5228b 100644 --- a/clients/banking/src/locales/es.json +++ b/clients/banking/src/locales/es.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Estás enviando exactamente {amount}", "transfer.new.internationalTransfer.amount.description": "Cantidad total que convertiremos {amount} (Tipo de cambio {rate})", "transfer.new.internationalTransfer.amount.label": "El beneficiario recibe", - "transfer.new.internationalTransfer.amount.summary.title": "Estás enviando", "transfer.new.internationalTransfer.amount.title": "Introduce los detalles de tu transferencia", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "El valor no coincide con el formato esperado", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "El valor no coincide con el formato esperado (ejemplo: {example})", diff --git a/clients/banking/src/locales/fr.json b/clients/banking/src/locales/fr.json index b860e1b4f..f2839ba6a 100644 --- a/clients/banking/src/locales/fr.json +++ b/clients/banking/src/locales/fr.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Vous envoyez exactement {amount}", "transfer.new.internationalTransfer.amount.description": "Montant total que nous convertirons {amount} (Taux de change {rate})", "transfer.new.internationalTransfer.amount.label": "Le bénéficiaire reçoit", - "transfer.new.internationalTransfer.amount.summary.title": "Vous envoyez", "transfer.new.internationalTransfer.amount.title": "Entrez les détails de votre virement", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "La valeur ne correspond pas au format attendu", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "La valeur ne correspond pas au format attendu (exemple : {example})", diff --git a/clients/banking/src/locales/it.json b/clients/banking/src/locales/it.json index 7ee6d0fa7..bf797478f 100644 --- a/clients/banking/src/locales/it.json +++ b/clients/banking/src/locales/it.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Invii esattamente {amount}", "transfer.new.internationalTransfer.amount.description": "Importo totale che convertiremo {amount} (Tasso di cambio {rate})", "transfer.new.internationalTransfer.amount.label": "Beneficiario riceve", - "transfer.new.internationalTransfer.amount.summary.title": "Stai inviando", "transfer.new.internationalTransfer.amount.title": "Inserisci i dettagli del tuo bonifico", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "Il valore non corrisponde al pattern atteso", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "Il valore non corrisponde al pattern atteso (esempio: {example})", diff --git a/clients/banking/src/locales/nl.json b/clients/banking/src/locales/nl.json index eb044830b..b6f2353e9 100644 --- a/clients/banking/src/locales/nl.json +++ b/clients/banking/src/locales/nl.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Je stuurt precies {amount}", "transfer.new.internationalTransfer.amount.description": "Totaalbedrag dat we omrekenen: {amount} (Wisselkoers: {rate})", "transfer.new.internationalTransfer.amount.label": "Begunstigde ontvangt", - "transfer.new.internationalTransfer.amount.summary.title": "Je stuurt", "transfer.new.internationalTransfer.amount.title": "Geef details over je overschrijving", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "De waarde komt niet overeen met het verwachte patroon", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "De waarde komt niet overeen met het verwachte patroon (bijvoorbeeld: {example})", diff --git a/clients/banking/src/locales/pt.json b/clients/banking/src/locales/pt.json index bfeec0744..7f96e1a2c 100644 --- a/clients/banking/src/locales/pt.json +++ b/clients/banking/src/locales/pt.json @@ -705,7 +705,6 @@ "transfer.new.internationalTransfer.amount.converted": "Você envia exatamente {amount}", "transfer.new.internationalTransfer.amount.description": "Valor total a ser convertido {amount} (Taxa de câmbio {rate})", "transfer.new.internationalTransfer.amount.label": "Beneficiário recebe", - "transfer.new.internationalTransfer.amount.summary.title": "Você está enviando", "transfer.new.internationalTransfer.amount.title": "Insira os detalhes sobre a sua transferência", "transfer.new.internationalTransfer.beneficiary.form.field.invalid": "O valor não corresponde ao padrão esperado", "transfer.new.internationalTransfer.beneficiary.form.field.invalid.example": "O valor não corresponde ao padrão esperado (exemplo: {example})",