Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/fragments/start/getting-started/next/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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
```
Comment on lines +203 to 207
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be removed in favor of the previous page's section on installing these libraries?https://docs.amplify.aws/start/getting-started/setup/q/integration/next/#initialize-a-new-backend

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. I feel like folks landing on this page directly (e.g. via Google) might need to know these, thus why it's stated "Ensure you have..."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend we have people install the UI libs in the same section as they work with them. Otherwise, it's disjointed and not modular


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';
Expand Down
2 changes: 1 addition & 1 deletion src/fragments/start/getting-started/next/hosting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ amplify add hosting

<Callout warning>

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.

</Callout>

Expand Down