I have a react app being developed with the Amazon Amplify framework. As per the documentation I am trying to retrieve my username (that I have specified during the signup process) before the Signout button. The document is not clearly instructed on how to display my username, as the <AmplifyGreetings> component puts a dummy attribute of username. Could someone guide me on how to do that?
Code: App.js
import React from "react";
import { withAuthenticator, AmplifyGreetings } from "@aws-amplify/ui-react";
class App extends React.Component {
render() {
return (
<div>
<AmplifyGreetings username="retrieve your username here"></AmplifyGreetings>
</div>
);
}
}
export default withAuthenticator(App);
