mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #174 from appwrite/fix-4732-fix-web-code-sample
Fix web code sample
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user