From 2ec2134f7d516b7252d50495f837f1d655bc7714 Mon Sep 17 00:00:00 2001 From: Depender Date: Thu, 12 Oct 2023 16:44:14 +0530 Subject: [PATCH 1/3] docs: Fix import path typo in Nextjs Quickstart documentation --- .../docs/quick-starts/nextjs/+page.markdoc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/routes/docs/quick-starts/nextjs/+page.markdoc b/src/routes/docs/quick-starts/nextjs/+page.markdoc index d059edb77e..ebae46372b 100644 --- a/src/routes/docs/quick-starts/nextjs/+page.markdoc +++ b/src/routes/docs/quick-starts/nextjs/+page.markdoc @@ -6,31 +6,35 @@ difficulty: beginner readtime: 3 back: /docs/quick-starts --- + Learn how to setup your first Next.js project powered by Appwrite. + {% section #step-1 step=1 title="Create project" %} Head to the [Appwrite Console](https://cloud.appwrite.io/console). {% only_dark %} ![Create project screen](/images/docs/quick-starts/dark/create-project.png) {% /only_dark %} + {% only_light %} ![Create project screen](/images/docs/quick-starts/create-project.png) {% /only_light %} If this is your first time using Appwrite, create an account and create your first project. -Then, under **Add a platform**, add a **Web app**. The **Hostname** should be `localhost`. +Then, under **Add a platform**, add a **Web app**. The **Hostname** should be `localhost`. {% only_dark %} ![Add a platform](/images/docs/quick-starts/dark/add-platform.png) {% /only_dark %} + {% only_light %} ![Add a platform](/images/docs/quick-starts/add-platform.png) {% /only_light %} You can skip optional steps. - {% /section %} + {% section #step-2 step=2 title="Create Next.js project" %} Create a Next.js project and create a **JavaScript** Next.js project. @@ -38,20 +42,22 @@ Create a Next.js project and create a **JavaScript** Next.js project. npx create-next-app@latest && cd my-app ``` {% /section %} -{% section #step-3 step=3 title="Install Appwrite SDK" %} +{% section #step-3 step=3 title="Install Appwrite SDK" %} Install the JavaScript Appwrite SDK. ```sh npm install appwrite ``` {% /section %} + {% section #step-4 step=4 title="Define Appwrite service" %} -Find your project's ID in the **Settings** page. +Find your project's ID in the **Settings** page. {% only_dark %} ![Project settings screen](/images/docs/quick-starts/dark/project-id.png) {% /only_dark %} + {% only_light %} ![Project settings screen](/images/docs/quick-starts/project-id.png) {% /only_light %} @@ -71,13 +77,14 @@ export const account = new Account(client); 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. ```js "use client"; import { useState } from "react"; -import { account, ID } from "appwrite"; +import { account, ID } from "./appwrite"; const LoginPage = () => { const [loggedInUser, setLoggedInUser] = useState(null); @@ -152,4 +159,4 @@ export default LoginPage; Run your project with `npm run dev` and open [Localhost on Port 3000](http://localhost:3000) in your browser. Don't forget to add some CSS to suit your style. -{% /section %} \ No newline at end of file +{% /section %} From 2a5e1ddcd29d26d8f81a3ab122a5b305b3123368 Mon Sep 17 00:00:00 2001 From: Depender Date: Wed, 18 Oct 2023 13:27:42 +0530 Subject: [PATCH 2/3] docs: correct import path typo in Nextjs Quickstart documentation --- .../docs/quick-starts/nextjs/+page.markdoc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/routes/docs/quick-starts/nextjs/+page.markdoc b/src/routes/docs/quick-starts/nextjs/+page.markdoc index ebae46372b..a47c1aebd8 100644 --- a/src/routes/docs/quick-starts/nextjs/+page.markdoc +++ b/src/routes/docs/quick-starts/nextjs/+page.markdoc @@ -6,35 +6,31 @@ difficulty: beginner readtime: 3 back: /docs/quick-starts --- - Learn how to setup your first Next.js project powered by Appwrite. - {% section #step-1 step=1 title="Create project" %} Head to the [Appwrite Console](https://cloud.appwrite.io/console). {% only_dark %} ![Create project screen](/images/docs/quick-starts/dark/create-project.png) {% /only_dark %} - {% only_light %} ![Create project screen](/images/docs/quick-starts/create-project.png) {% /only_light %} If this is your first time using Appwrite, create an account and create your first project. -Then, under **Add a platform**, add a **Web app**. The **Hostname** should be `localhost`. +Then, under **Add a platform**, add a **Web app**. The **Hostname** should be `localhost`. {% only_dark %} ![Add a platform](/images/docs/quick-starts/dark/add-platform.png) {% /only_dark %} - {% only_light %} ![Add a platform](/images/docs/quick-starts/add-platform.png) {% /only_light %} You can skip optional steps. -{% /section %} +{% /section %} {% section #step-2 step=2 title="Create Next.js project" %} Create a Next.js project and create a **JavaScript** Next.js project. @@ -42,22 +38,20 @@ Create a Next.js project and create a **JavaScript** Next.js project. npx create-next-app@latest && cd my-app ``` {% /section %} - {% section #step-3 step=3 title="Install Appwrite SDK" %} + Install the JavaScript Appwrite SDK. ```sh npm install appwrite ``` {% /section %} - {% section #step-4 step=4 title="Define Appwrite service" %} -Find your project's ID in the **Settings** page. +Find your project's ID in the **Settings** page. {% only_dark %} ![Project settings screen](/images/docs/quick-starts/dark/project-id.png) {% /only_dark %} - {% only_light %} ![Project settings screen](/images/docs/quick-starts/project-id.png) {% /only_light %} @@ -77,7 +71,6 @@ export const account = new Account(client); 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. @@ -159,4 +152,4 @@ export default LoginPage; Run your project with `npm run dev` and open [Localhost on Port 3000](http://localhost:3000) in your browser. Don't forget to add some CSS to suit your style. -{% /section %} +{% /section %} \ No newline at end of file From 56b92e8c16dc2dff1c019dad3c65a1516eaa5c7e Mon Sep 17 00:00:00 2001 From: Depender Date: Thu, 19 Oct 2023 00:31:50 +0530 Subject: [PATCH 3/3] Correct file name from page.jsx to page.js --- src/routes/docs/quick-starts/nextjs/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/quick-starts/nextjs/+page.markdoc b/src/routes/docs/quick-starts/nextjs/+page.markdoc index a47c1aebd8..78f022c5f4 100644 --- a/src/routes/docs/quick-starts/nextjs/+page.markdoc +++ b/src/routes/docs/quick-starts/nextjs/+page.markdoc @@ -72,7 +72,7 @@ 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";