@@ -195,9 +150,9 @@
{:else}
{/if}
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/store.ts b/src/routes/console/project-[project]/overview/platforms/wizard/store.ts
index 66d15738f3..b826be83d8 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/store.ts
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/store.ts
@@ -3,14 +3,19 @@ import { sdkForConsole } from '$lib/stores/sdk';
import { cachedStore } from '$lib/helpers/cache';
import type { Models } from '@aw-labs/appwrite-console';
+type Store = Partial
& {
+ projectId?: string;
+};
+
function createPlatformStore() {
- const { subscribe, update, set } = writable>({
+ const { subscribe, update, set } = writable({
$id: null,
name: null,
hostname: null,
key: null,
store: null,
- type: null
+ type: null,
+ projectId: null
});
return {
@@ -24,7 +29,8 @@ function createPlatformStore() {
hostname: null,
key: null,
store: null,
- type: null
+ type: null,
+ projectId: null
});
}
};
diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte
index 12d9fcccde..926eb66abc 100644
--- a/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte
+++ b/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte
@@ -4,50 +4,19 @@
import { Pill } from '$lib/elements';
import { FormList, InputText } from '$lib/elements/forms';
import { WizardStep } from '$lib/layout';
- import { sdkForConsole } from '$lib/stores/sdk';
+ import { app } from '$lib/stores/app';
import { wizard } from '$lib/stores/wizard';
import { createPlatform } from '../store';
- import { app } from '$lib/stores/app';
- import Light from './light.svg';
import Dark from './dark.svg';
- import { trackEvent } from '$lib/actions/analytics';
+ import Light from './light.svg';
- const projectId = $page.params.project;
+ $createPlatform.projectId = $page.params.project;
const suggestions = ['*.vercel.app', '*.netlify.app', '*.gitpod.io'];
$wizard.media = $app.themeInUse === 'dark' ? Dark : Light;
- async function beforeSubmit() {
- if ($createPlatform.$id) {
- await sdkForConsole.projects.updatePlatform(
- projectId,
- $createPlatform.$id,
- $createPlatform.name,
- $createPlatform.key,
- $createPlatform.store,
- $createPlatform.hostname
- );
-
- return;
- }
-
- const platform = await sdkForConsole.projects.createPlatform(
- projectId,
- 'web',
- $createPlatform.name,
- undefined,
- undefined,
- $createPlatform.hostname
- );
-
- trackEvent('submit_platform_create', {
- type: 'web'
- });
-
- $createPlatform.$id = platform.$id;
- }
-
+
Register your Web app