Amplify-js: [React] Amplify Custom Component override option hides default SignUp link

Created on 31 Jan 2019  路  3Comments  路  Source: aws-amplify/amplify-js

Describe the bug
When trying to override React Component as stated in https://aws-amplify.github.io/docs/js/authentication#customize-ui link to Sign Up is missing, which requires to add custom text.

To Reproduce
Steps to reproduce the behavior:

  1. Create Authenticator Component like so:
import { Authenticator, SignUp, SignIn } from 'aws-amplify-react';

<Authenticator hideDefault={true}>
  <SignIn />
  <MyCustomSignUp override={SignUp}/> {/* to tell the Authenticator the SignUp component is not hidden but overridden */}
</Authenticator>
  1. Open page with auth form

Expected behavior
Default SignIn form should appear with "No Account ? Create One" link.

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Desktop (please complete the following information):

  • OS: Linux Solus
  • Browser Chrome
  • Version 67
Auth UI bug investigating

Most helpful comment

Hi @pippo111,

It looks like the documentation may be incorrect here. Can you try changing override={SignUp} to use a string instead like: <MyCustomSignUp override={'SignUp'} />

Let me know if that works. Based on your response we can either improve the documentation or improve the actual code driving this.

All 3 comments

Hi @pippo111,

It looks like the documentation may be incorrect here. Can you try changing override={SignUp} to use a string instead like: <MyCustomSignUp override={'SignUp'} />

Let me know if that works. Based on your response we can either improve the documentation or improve the actual code driving this.

Hi @jordanranz

Yes, changing override to use a string fixed the issue, so it seems that documentation is in fact incorrect here. Thank you.

No problem, I'll go ahead and fix the documentation. Going to close this now. Please reopen this if you run into any related issues.

Was this page helpful?
0 / 5 - 0 ratings