Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login form implemented with Amplify is not applied styling

I asked same question in Japanese forum and no answer was returned so that I am asiking in this site.

This question is about AWS Amplify.

I am trying to implement login form with React and withAuthenticator() of Amplify in reference to a document of AWS(https://aws-amplify.github.io/docs/js/authentication) , but my login form is not like sample's UI of the document and css is not applied like this below image.

I can login and signup.

Is there anything to resolve this problem?

my login form made by withAuthenticator()

import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
import { withAuthenticator } from 'aws-amplify-react';

Amplify.configure(awsconfig);

function App() {
  return (

  );
}

export default withAuthenticator(App); 

I cleared cache but not working.

Also there are no errors in the development tool of Chrome.

Sorry for my poor english.

like image 775
mint satsuki Avatar asked Dec 18 '22 13:12

mint satsuki


2 Answers

Try using @aws-amplify/ui-react instead of aws-amplify-react.

import { withAuthenticator } from '@aws-amplify/ui-react';
like image 140
vollgong Avatar answered Feb 13 '23 20:02

vollgong


In your app.js add the following inport

import '@aws-amplify/ui/dist/style.css';
like image 24
Sambulo Senda Avatar answered Feb 13 '23 22:02

Sambulo Senda