diff --git a/components/InviteForm.tsx b/components/InviteForm.tsx index f26dbdd..fc46ad9 100644 --- a/components/InviteForm.tsx +++ b/components/InviteForm.tsx @@ -74,15 +74,26 @@ export default class InviteForm extends React.Component { if (this.state.submitted) { messageText = "Kutsu lähetetty antamaasi sähköpostiosoitteeseen."; } else if ( - this.state.error.status === 400 && - this.state.error.data === "invalid_email" + this.state.error.response.status === 400 && + this.state.error.response.data === "invalid_email" ) { messageText = "Tarkasta syöttämäsi sähköpostiosoite"; } else if ( - this.state.error.status === 400 && - this.state.error.data === "already_invited" + this.state.error.response.status === 400 && + this.state.error.response.data === "already_invited" ) { messageText = "Sähköpostiosoitteeseen on jo lähetetty kutsu"; + } else if ( + this.state.error.response.status === 400 && + this.state.error.response.data === "already_in_team" + ) { + messageText = ( + + Tällä sähköpostilla on jo luotu tunnus.
Voit vaihtaa + unohtuneen salasanasi{" "} + täältä. +
+ ); } else { messageText = "Jotain meni pieleen. Yritä hetken päästä uudelleen."; } diff --git a/styles/style.styl b/styles/style.styl index d1a8ea5..4f98476 100644 --- a/styles/style.styl +++ b/styles/style.styl @@ -214,7 +214,9 @@ section:first-child transform rotateX(0deg) transform-origin 100% 0 animation drop 0.6s linear - + a + color #fff + font-weight bold .form.has-error .form--message background rgb(226, 33, 112)