mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: onboarding?
This commit is contained in:
1 parent
1dc5c71c65
commit
a74c0a143d
2 files changed
+24
-30
No files matched your search
@@ -6,7 +6,7 @@ import { page } from '$app/state';
|
||||
export function getFlagUrl(countryCode: string) {
|
||||
if (!isValueOfStringEnum(Flag, countryCode)) return '';
|
||||
return sdk
|
||||
.forProject(page.params.region, page.params.project)
|
||||
.forProject(page.params.region, 'console')
|
||||
.avatars.getFlag(countryCode, 22, 15, 100)
|
||||
?.toString();
|
||||
}
|
||||
@@ -21,38 +21,32 @@
|
||||
async function createProject() {
|
||||
isLoading = true;
|
||||
|
||||
if (data.organization) {
|
||||
try {
|
||||
const teamId = data.organization.$id;
|
||||
try {
|
||||
const project = await sdk.forConsole.projects.create(
|
||||
id ?? ID.unique(),
|
||||
projectName,
|
||||
teamId,
|
||||
region
|
||||
);
|
||||
trackEvent(Submit.ProjectCreate, {
|
||||
customId: !!id,
|
||||
teamId
|
||||
});
|
||||
const project = await sdk.forConsole.projects.create(
|
||||
id ?? ID.unique(),
|
||||
projectName,
|
||||
teamId,
|
||||
region
|
||||
);
|
||||
trackEvent(Submit.ProjectCreate, {
|
||||
customId: !!id,
|
||||
teamId
|
||||
});
|
||||
|
||||
startAnimation = true;
|
||||
startAnimation = true;
|
||||
|
||||
trackEvent(Submit.ProjectCreate, {
|
||||
teamId: teamId
|
||||
});
|
||||
|
||||
setTimeout(async () => {
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
goto(`${base}/project-${project.region}-${project.$id}`);
|
||||
}, 3000);
|
||||
} catch (e) {
|
||||
trackError(e, Submit.ProjectCreate);
|
||||
isLoading = false;
|
||||
addNotification({
|
||||
type: 'error',
|
||||
message: e.message
|
||||
});
|
||||
}
|
||||
setTimeout(async () => {
|
||||
await invalidate(Dependencies.ACCOUNT);
|
||||
goto(`${base}/project-${project.region}-${project.$id}`);
|
||||
}, 3000);
|
||||
} catch (e) {
|
||||
trackError(e, Submit.ProjectCreate);
|
||||
isLoading = false;
|
||||
addNotification({
|
||||
type: 'error',
|
||||
message: e.message
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user