Skip to content

Commit

Permalink
Fix issue with ConfirmForm when using ssr. We should not use redirect…
Browse files Browse the repository at this point in the history
… here
  • Loading branch information
OtterleyW committed Oct 6, 2020
1 parent c18f14c commit 91e6dfd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/forms/ConfirmSignupForm/ConfirmSignupForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FormattedMessage, injectIntl, intlShape } from '../../util/reactIntl';
import { Form as FinalForm } from 'react-final-form';
import classNames from 'classnames';
import * as validators from '../../util/validators';
import { Form, PrimaryButton, FieldTextInput, NamedRedirect } from '../../components';
import { Form, PrimaryButton, FieldTextInput } from '../../components';

import css from './ConfirmSignupForm.css';

Expand All @@ -27,11 +27,6 @@ const ConfirmSignupFormComponent = props => (
authInfo,
} = fieldRenderProps;

// If we don't have authentication information from idp provider, redirect user back to normal signup page
if (!authInfo) {
return <NamedRedirect name="SignupPage" />;
}

// email
const emailLabel = intl.formatMessage({
id: 'ConfirmSignupForm.emailLabel',
Expand Down Expand Up @@ -94,6 +89,11 @@ const ConfirmSignupFormComponent = props => (
</span>
);

// If authInfo is not available we should not show the ConfirmForm
if (!authInfo) {
return;
}

// Initial values from idp provider
const { email, firstName, lastName, idpId } = authInfo;

Expand Down

0 comments on commit 91e6dfd

Please sign in to comment.