Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/routes/docs/quick-starts/nextjs/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ export { ID } from 'appwrite';
```
{% /section %}
{% section #step-5 step=5 title="Create a login page" %}
Create or update `app/page.jsx` file and add the following code to it.
Create or update `app/page.js` file and add the following code to it.

```js
"use client";
import { useState } from "react";
import { account, ID } from "appwrite";
import { account, ID } from "./appwrite";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update only this line and the jsx extension, and revert all the newline and add/removed space changes in this PR to keep things concise.

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've made the one-line change and kept the original spacing as per your request. It's important to note that the file is already in the .js format, so adding the .jsx extension is not required. Additionally, according to the Next.js documentation, explicit extensions like .js, .ts, .jsx, and .tsx are not necessary for importing files.

If you have any further questions or need additional assistance, please feel free to let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, this line:

Create or update `app/page.jsx` file and add the following code to it.

is using the wrong file name compared to what's generated in Next.js. Please also fix this quickly, thanks!

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 misunderstood because I usually create Next.js apps with TypeScript, where the default extension is .tsx. I mistakenly assumed that in plain JavaScript, it would be .jsx. My apologies for the confusion. I've made the necessary change to page.js as you requested. Please review the updated code. If there are any further adjustments needed, please let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem


const LoginPage = () => {
const [loggedInUser, setLoggedInUser] = useState(null);
Expand Down