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
Changes from 5 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/tutorials/react/step-4/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Create a new file `src/lib/context/user.jsx` and add the following code to it.

```js
import { createContext, useContext, useEffect, useState } from "react";
import { account } from "../appwrite";
import { account, ID } from "../appwrite";
gewenyu99 marked this conversation as resolved.
Show resolved Hide resolved

const UserContext = createContext();

Expand All @@ -36,7 +36,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