import { Amplify } from 'aws-amplify';
import { Authenticator } from '@aws-amplify/ui-react';
import '@aws-amplify/ui-react/styles.css';
// Amplify UI Primitives to style the custom components
import {
Button,
Heading,
Image,
Text,
View,
useAuthenticator,
useTheme,
} from '@aws-amplify/ui-react';
import awsExports from './aws-exports';
Amplify.configure(awsExports);
const components = {
Header() {
const { tokens } = useTheme();
return (
);
},
Footer() {
const { tokens } = useTheme();
return (
© All Rights Reserved
);
},
SignIn: {
Header() {
const { tokens } = useTheme();
return (
Sign in to your account
);
},
Footer() {
const { toResetPassword } = useAuthenticator();
return (
);
},
},
SignUp: {
Header() {
const { tokens } = useTheme();
return (
Create a new account
);
},
Footer() {
const { toSignIn } = useAuthenticator();
return (
);
},
},
ConfirmSignUp: {
Header() {
const { tokens } = useTheme();
return (
Enter Information:
);
},
Footer() {
return Footer Information;
},
},
SetupTOTP: {
Header() {
const { tokens } = useTheme();
return (
Enter Information:
);
},
Footer() {
return Footer Information;
},
},
ConfirmSignIn: {
Header() {
const { tokens } = useTheme();
return (
Enter Information:
);
},
Footer() {
return Footer Information;
},
},
ResetPassword: {
Header() {
const { tokens } = useTheme();
return (
Enter Information:
);
},
Footer() {
return Footer Information;
},
},
ConfirmResetPassword: {
Header() {
const { tokens } = useTheme();
return (
Enter Information:
);
},
Footer() {
return Footer Information;
},
},
};
const formFields = {
signIn: {
username: {
placeholder: 'Enter your email',
},
},
signUp: {
password: {
label: 'Password:',
placeholder: 'Enter your Password:',
isRequired: false,
order: 2,
},
confirm_password: {
label: 'Confirm Password:',
order: 1,
},
},
forceNewPassword: {
password: {
placeholder: 'Enter your Password:',
},
},
resetPassword: {
username: {
placeholder: 'Enter your email:',
},
},
confirmResetPassword: {
confirmation_code: {
placeholder: 'Enter your Confirmation Code:',
label: 'New Label',
isRequired: false,
},
confirm_password: {
placeholder: 'Enter your Password Please:',
},
},
setupTOTP: {
QR: {
totpIssuer: 'test issuer',
totpUsername: 'amplify_qr_test_user',
},
confirmation_code: {
label: 'New Label',
placeholder: 'Enter your Confirmation Code:',
isRequired: false,
},
},
confirmSignIn: {
confirmation_code: {
label: 'New Label',
placeholder: 'Enter your Confirmation Code:',
isRequired: false,
},
},
};
export default function App() {
return (
{({ signOut }) => }
);
}