Skip to content

Instantly share code, notes, and snippets.

@mikehibm
Created April 17, 2020 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikehibm/937556128f076b00670fb4af18ffc95a to your computer and use it in GitHub Desktop.
Save mikehibm/937556128f076b00670fb4af18ffc95a to your computer and use it in GitHub Desktop.
import Amplify from 'aws-amplify';
import { AmplifyAuthenticator, AmplifySignUp } from '@aws-amplify/ui-react';
import awsconfig from '../aws-exports';
import { MyLayout } from '../components/MyLayout';
import { TodoApp } from '../components/TodoApp';
Amplify.configure(awsconfig);
const contentStyle = {
paddingLeft: '0',
paddingRight: '0',
textAlign: 'center',
};
export default () => {
return (
<MyLayout contentStyle={contentStyle}>
<AmplifyAuthenticator>
<AmplifySignUp
headerText="ユーザー登録"
slot="sign-up"
formFields={[
{ type: 'username', required: true },
{ type: 'password', required: true },
{ type: 'email', required: true },
{
type: 'phone_number',
required: false,
disabled: true,
},
]}
submitButtonText="登録する"
/>
<TodoApp />
</AmplifyAuthenticator>
</MyLayout>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment