feat(SW-898): add pending ui text to signup button
This commit is contained in:
@@ -37,6 +37,10 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
|
||||
const email = intl.formatMessage({ id: "Email address" })
|
||||
const phoneNumber = intl.formatMessage({ id: "Phone number" })
|
||||
const zipCode = intl.formatMessage({ id: "Zip code" })
|
||||
const signupButtonText = intl.formatMessage({
|
||||
id: "Sign up to Scandic Friends",
|
||||
})
|
||||
const signingUpPendingText = intl.formatMessage({ id: "Signing up..." })
|
||||
|
||||
const signup = trpc.user.signup.useMutation({
|
||||
onSuccess: (data) => {
|
||||
@@ -183,7 +187,7 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
|
||||
onClick={() => methods.trigger()}
|
||||
data-testid="trigger-validation"
|
||||
>
|
||||
{intl.formatMessage({ id: "Sign up to Scandic Friends" })}
|
||||
{signupButtonText}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
@@ -194,7 +198,9 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
|
||||
disabled={methods.formState.isSubmitting || signup.isPending}
|
||||
data-testid="submit"
|
||||
>
|
||||
{intl.formatMessage({ id: "Sign up to Scandic Friends" })}
|
||||
{methods.formState.isSubmitting || signup.isPending
|
||||
? signingUpPendingText
|
||||
: signupButtonText}
|
||||
</Button>
|
||||
)}
|
||||
</form>
|
||||
|
||||
@@ -337,6 +337,7 @@
|
||||
"Show wellness & exercise": "Vis velvære og motion",
|
||||
"Sign up bonus": "Velkomstbonus",
|
||||
"Sign up to Scandic Friends": "Tilmeld dig Scandic Friends",
|
||||
"Signing up...": "Tilmelder...",
|
||||
"Skip to main content": "Spring over og gå til hovedindhold",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Noget gik galt, og vi kunne ikke tilføje dit kort. Prøv venligst igen senere.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Noget gik galt, og vi kunne ikke fjerne dit kort. Prøv venligst igen senere.",
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
"Show wellness & exercise": "Zeige Wellness und Bewegung",
|
||||
"Sign up bonus": "Anmelde-Bonus",
|
||||
"Sign up to Scandic Friends": "Treten Sie Scandic Friends bei",
|
||||
"Signing up...": "Registrierung läuft...",
|
||||
"Skip to main content": "Direkt zum Inhalt",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Ein Fehler ist aufgetreten und wir konnten Ihre Karte nicht hinzufügen. Bitte versuchen Sie es später erneut.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Ein Fehler ist aufgetreten und wir konnten Ihre Karte nicht entfernen. Bitte versuchen Sie es später noch einmal.",
|
||||
|
||||
@@ -366,6 +366,7 @@
|
||||
"Show wellness & exercise": "Show wellness & exercise",
|
||||
"Sign up bonus": "Sign up bonus",
|
||||
"Sign up to Scandic Friends": "Sign up to Scandic Friends",
|
||||
"Signing up...": "Signing up...",
|
||||
"Skip to main content": "Skip to main content",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Something went wrong and we couldn't add your card. Please try again later.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Something went wrong and we couldn't remove your card. Please try again later.",
|
||||
|
||||
@@ -338,6 +338,7 @@
|
||||
"Show wellness & exercise": "Näytä hyvinvointi ja liikunta",
|
||||
"Sign up bonus": "Liittymisbonus",
|
||||
"Sign up to Scandic Friends": "Liity Scandic Friends -jäseneksi",
|
||||
"Signing up...": "Rekisteröidytään...",
|
||||
"Skip to main content": "Siirry pääsisältöön",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Jotain meni pieleen, emmekä voineet lisätä korttiasi. Yritä myöhemmin uudelleen.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Jotain meni pieleen, emmekä voineet poistaa korttiasi. Yritä myöhemmin uudelleen.",
|
||||
|
||||
@@ -335,6 +335,7 @@
|
||||
"Show wellness & exercise": "Vis velvære og trening",
|
||||
"Sign up bonus": "Velkomstbonus",
|
||||
"Sign up to Scandic Friends": "Bli med i Scandic Friends",
|
||||
"Signing up...": "Registrerer...",
|
||||
"Skip to main content": "Gå videre til hovedsiden",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Noe gikk galt, og vi kunne ikke legge til kortet ditt. Prøv igjen senere.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Noe gikk galt, og vi kunne ikke fjerne kortet ditt. Vennligst prøv igjen senere.",
|
||||
|
||||
@@ -335,6 +335,7 @@
|
||||
"Show wellness & exercise": "Visa välbefinnande och träning",
|
||||
"Sign up bonus": "Välkomstbonus",
|
||||
"Sign up to Scandic Friends": "Bli medlem i Scandic Friends",
|
||||
"Signing up...": "Registrerar...",
|
||||
"Skip to main content": "Fortsätt till huvudinnehåll",
|
||||
"Something went wrong and we couldn't add your card. Please try again later.": "Något gick fel och vi kunde inte lägga till ditt kort. Försök igen senare.",
|
||||
"Something went wrong and we couldn't remove your card. Please try again later.": "Något gick fel och vi kunde inte ta bort ditt kort. Försök igen senare.",
|
||||
|
||||
Reference in New Issue
Block a user