Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix React tutorial create account #438

Merged
merged 6 commits into from
Jan 16, 2024
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
2 changes: 1 addition & 1 deletion src/routes/docs/tutorials/react/step-3/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can skip optional steps.

# Initialize Appwrite SDK {% #init-sdk %}

To use Appwrite in our Svelte app, we'll need to find our project ID. Find your project's ID in the **Settings** page.
To use Appwrite in our React app, we'll need to find our project ID. Find your project's ID in the **Settings** page.

{% only_dark %}
![Project settings screen](/images/docs/quick-starts/dark/project-id.png)
Expand Down
3 changes: 2 additions & 1 deletion src/routes/docs/tutorials/react/step-4/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ We'll use context and a custom hook to manage our user's data.
Create a new file `src/lib/context/user.jsx` and add the following code to it.

```js
import { ID } from "appwrite";
import { createContext, useContext, useEffect, useState } from "react";
import { account } from "../appwrite";

Expand All @@ -36,7 +37,7 @@ export function UserProvider(props) {
}

async function register(email, password) {
await account.create(email, password);
await account.create(ID.unique(), email, password);
stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved
await login(email, password);
}

Expand Down