aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-01-22 14:26:31 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-01-22 14:26:31 +0100
commit945cb5982c4b1b42d17ce91171b6a6740eb3a3e5 (patch)
tree8481794625abecea3230e49f789b7336be512bf0 /src/components/auth
parentADDED invite button in Account Settings (diff)
downloadferdium-app-945cb5982c4b1b42d17ce91171b6a6740eb3a3e5.tar.gz
ferdium-app-945cb5982c4b1b42d17ce91171b6a6740eb3a3e5.tar.zst
ferdium-app-945cb5982c4b1b42d17ce91171b6a6740eb3a3e5.zip
return to account screen from invite screen
cheap solution because `state` prop of `<Link>` is not being passed to route
Diffstat (limited to 'src/components/auth')
-rw-r--r--src/components/auth/Invite.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js
index c1d815dcd..d4d789781 100644
--- a/src/components/auth/Invite.js
+++ b/src/components/auth/Invite.js
@@ -64,7 +64,10 @@ export default class Invite extends Component {
64 e.preventDefault(); 64 e.preventDefault();
65 this.form.submit({ 65 this.form.submit({
66 onSuccess: (form) => { 66 onSuccess: (form) => {
67 this.props.onSubmit({ invites: form.values().invite }); 67 this.props.onSubmit({
68 invites: form.values().invite,
69 from: this.props.from
70 });
68 }, 71 },
69 onError: () => {}, 72 onError: () => {},
70 }); 73 });
@@ -73,6 +76,7 @@ export default class Invite extends Component {
73 render() { 76 render() {
74 const { form } = this; 77 const { form } = this;
75 const { intl } = this.context; 78 const { intl } = this.context;
79 const { from } = this.props;
76 80
77 return ( 81 return (
78 <div className="auth__container auth__container--signup"> 82 <div className="auth__container auth__container--signup">
@@ -99,7 +103,7 @@ export default class Invite extends Component {
99 label={intl.formatMessage(messages.submitButtonLabel)} 103 label={intl.formatMessage(messages.submitButtonLabel)}
100 /> 104 />
101 <Link 105 <Link
102 to="/" 106 to={ !!from ? from : '/'}
103 className="franz-form__button franz-form__button--secondary auth__button auth__button--skip" 107 className="franz-form__button franz-form__button--secondary auth__button auth__button--skip"
104 > 108 >
105 {intl.formatMessage(messages.skipButtonLabel)} 109 {intl.formatMessage(messages.skipButtonLabel)}