From eb8d50e0fd39898ff99959a32b60a4f99b783a21 Mon Sep 17 00:00:00 2001 From: Kevin Old Date: Fri, 7 Oct 2022 14:04:15 -0500 Subject: [PATCH 1/2] fix: edits to next.js getting started to bring it current --- src/fragments/start/getting-started/next/api.mdx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/fragments/start/getting-started/next/api.mdx b/src/fragments/start/getting-started/next/api.mdx index 11487dbe329..4fc74538d56 100644 --- a/src/fragments/start/getting-started/next/api.mdx +++ b/src/fragments/start/getting-started/next/api.mdx @@ -145,7 +145,7 @@ amplify console ### (Optional) Test your API -To test this out locally, you can run the `mock` command. +To test this out locally, you can run the `mock` command. Note: Refer to the [instructions to setup mocking](https://docs.amplify.aws/cli/usage/mock/). > If you'd like to go ahead and connect the front end, you can [jump to the next step](#connect-frontend-to-api). @@ -200,12 +200,20 @@ query ListPosts { In this section you will create a way to list and create posts from the Next.js application. To do this, you will fetch & render the latest posts from the server as well as create a new post on the client. -Open **pages/index.js** and replace it with the following code: +Ensure you have the following libraries installed: ```sh npm install aws-amplify @aws-amplify/ui-react ``` +Open **pages/\_app.js** and add the following code to import styles from [Amplify UI](https://ui.docs.amplify.aws): + +```jsx +import '@aws-amplify/ui-react/styles.css'; +``` + +Open **pages/index.js** and replace it with the following code: + ```jsx // pages/index.js import { Authenticator } from '@aws-amplify/ui-react'; From 8b8dbf2c7fdfeca446d5a2007e96ce48ed0e74d8 Mon Sep 17 00:00:00 2001 From: Kevin Old Date: Fri, 7 Oct 2022 14:13:07 -0500 Subject: [PATCH 2/2] updates to next.js hosting content --- src/fragments/start/getting-started/next/hosting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragments/start/getting-started/next/hosting.mdx b/src/fragments/start/getting-started/next/hosting.mdx index 9ff37c8a0a0..5d2509f1793 100644 --- a/src/fragments/start/getting-started/next/hosting.mdx +++ b/src/fragments/start/getting-started/next/hosting.mdx @@ -12,7 +12,7 @@ amplify add hosting -Next.js apps can only be deployed with Continuous deployment. We currently do not support manual deployments of Next.js apps. +Next.js apps can only be deployed with Continuous deployment. We currently do not support manual deployments of Next.js apps meaning the `amplify publish` command cannot be used to deploy Next.js apps, at this tme.