feat: remove project creation

This commit is contained in:
Arman
2023-12-29 10:00:35 +01:00
parent 98b93a2264
commit 720f0ecd5e
2 changed files with 6 additions and 34 deletions
@@ -30,19 +30,13 @@
try {
// Create free organization if coming from onboarding
if ($page.url.pathname.includes('/console/onboarding')) {
const freeOrg = await sdk.forConsole.billing.createOrganization(
await sdk.forConsole.billing.createOrganization(
ID.unique(),
'Personal Projects',
BillingPlan.STARTER,
null,
null
);
await sdk.forConsole.projects.create(
ID.unique(),
'My first project',
freeOrg.$id,
'fra'
);
}
const org = await sdk.forConsole.billing.createOrganization(
@@ -88,18 +82,6 @@
members_invited: $createOrganization?.collaborators?.length
});
// Create first pro project if onboarding
if ($page.url.pathname.includes('/console/onboarding')) {
await sdk.forConsole.projects.create(
ID.unique(),
'My first Pro project',
org.$id,
'fra'
);
trackEvent(Submit.ProjectCreate);
}
await invalidate(Dependencies.ACCOUNT);
await preloadData(`/console/organization-${org.$id}`);
await goto(`/console/organization-${org.$id}`);
+5 -15
View File
@@ -25,8 +25,8 @@
let plan: Tier;
const options = [
{ value: BillingPlan.STARTER, label: 'Starter - $0/billing period' },
{ value: BillingPlan.PRO, label: 'Pro - $15/billing period + add-ons' }
{ value: BillingPlan.STARTER, label: 'Starter - $0/month' },
{ value: BillingPlan.PRO, label: 'Pro - $15/month + add-ons' }
];
onMount(() => {
@@ -56,12 +56,6 @@
customId: !!id,
plan: tierToPlan(plan)?.name
});
await sdk.forConsole.projects.create(
ID.unique(),
'My first project',
org.$id,
'fra'
);
await invalidate(Dependencies.ACCOUNT);
await goto(`/console/organization-${org.$id}`);
addNotification({
@@ -84,14 +78,10 @@
} else {
try {
const org = await sdk.forConsole.teams.create(id ?? ID.unique(), orgName);
const project = await sdk.forConsole.projects.create(
ID.unique(),
'My first project',
org.$id,
'default'
);
await invalidate(Dependencies.ACCOUNT);
await goto(`/console/project-${project.$id}`);
await goto(`/console/organization-${org.$id}`);
addNotification({
message: `${orgName} organization successfully created`,
type: 'success'