Created
February 28, 2021 20:32
-
-
Save SahanAmarsha/d85e18865ee7b167c85a495765f801de to your computer and use it in GitHub Desktop.
_app.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Amplify } from "aws-amplify"; | |
import { AmplifyAuthenticator } from "@aws-amplify/ui-react"; | |
import awsExports from "../src/aws-exports"; | |
import "../styles/globals.css"; | |
Amplify.configure({ ...awsExports, ssr: true }); | |
function MyApp({ Component, pageProps }) { | |
return ( | |
<AmplifyAuthenticator> | |
<Component {...pageProps} /> | |
</AmplifyAuthenticator> | |
); | |
} | |
export default MyApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This did not work me.
I had to update it to:
FYI, I retrieved the orignal snippet from https://enlear.academy/complete-guide-to-amplify-and-next-js-7dd2b683282a