Merge pull request #174 from appwrite/fix-4732-fix-web-code-sample

Fix web code sample
This commit is contained in:
Torsten Dittmann
2022-11-22 09:52:17 +01:00
committed by GitHub
2 changed files with 8 additions and 4 deletions
@@ -12,8 +12,12 @@
let method: Method = Method.NPM;
const example1 = `import { Appwrite } from 'appwrite';`;
const example2 = `<script src="https://cdn.jsdelivr.net/npm/appwrite@${$versions['client-web']}" />`;
const example1 = `import { Client } from 'appwrite';`;
const example2 =
`<script src="https://cdn.jsdelivr.net/npm/appwrite@${$versions['client-web']}" />
<script>
const { Client } = Appwrite;
</script` + `>`; // Prevent svelte from processing the closing script tag
</script>
<WizardStep>
@@ -4,9 +4,9 @@
import { sdkForProject } from '$lib/stores/sdk';
const { endpoint, project } = sdkForProject.client.config;
const code = `const appwrite = new Appwrite();
const code = `const client = new Client();
appwrite
client
.setEndpoint('${endpoint}')
.setProject('${project}');`;
</script>