mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-03-19 17:06:03 +00:00
handle already_in_team error properly
This commit is contained in:
@@ -74,15 +74,26 @@ export default class InviteForm extends React.Component {
|
|||||||
if (this.state.submitted) {
|
if (this.state.submitted) {
|
||||||
messageText = "Kutsu lähetetty antamaasi sähköpostiosoitteeseen.";
|
messageText = "Kutsu lähetetty antamaasi sähköpostiosoitteeseen.";
|
||||||
} else if (
|
} else if (
|
||||||
this.state.error.status === 400 &&
|
this.state.error.response.status === 400 &&
|
||||||
this.state.error.data === "invalid_email"
|
this.state.error.response.data === "invalid_email"
|
||||||
) {
|
) {
|
||||||
messageText = "Tarkasta syöttämäsi sähköpostiosoite";
|
messageText = "Tarkasta syöttämäsi sähköpostiosoite";
|
||||||
} else if (
|
} else if (
|
||||||
this.state.error.status === 400 &&
|
this.state.error.response.status === 400 &&
|
||||||
this.state.error.data === "already_invited"
|
this.state.error.response.data === "already_invited"
|
||||||
) {
|
) {
|
||||||
messageText = "Sähköpostiosoitteeseen on jo lähetetty kutsu";
|
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 = (
|
||||||
|
<span>
|
||||||
|
Tällä sähköpostilla on jo luotu tunnus. <br /> Voit vaihtaa
|
||||||
|
unohtuneen salasanasi{" "}
|
||||||
|
<a href="https://koodiklinikka.slack.com/forgot">täältä</a>.
|
||||||
|
</span>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
messageText = "Jotain meni pieleen. Yritä hetken päästä uudelleen.";
|
messageText = "Jotain meni pieleen. Yritä hetken päästä uudelleen.";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,9 @@ section:first-child
|
|||||||
transform rotateX(0deg)
|
transform rotateX(0deg)
|
||||||
transform-origin 100% 0
|
transform-origin 100% 0
|
||||||
animation drop 0.6s linear
|
animation drop 0.6s linear
|
||||||
|
a
|
||||||
|
color #fff
|
||||||
|
font-weight bold
|
||||||
.form.has-error
|
.form.has-error
|
||||||
.form--message
|
.form--message
|
||||||
background rgb(226, 33, 112)
|
background rgb(226, 33, 112)
|
||||||
|
|||||||
Reference in New Issue
Block a user