Skip to content

Commit

Permalink
Merge pull request #667 from appwrite/fix-usage-broken-no-project
Browse files Browse the repository at this point in the history
fix: usage page broken when no projects
  • Loading branch information
lohanidamodar authored Dec 20, 2023
2 parents a410880 + e1a7039 commit b1957cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/lib/sdk/billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ export type AggregationList = {
};

export type AllowedRegions =
| 'eu-de'
| 'us-nyc'
| 'us-sfo'
| 'ap-in'
| 'eu-gb'
| 'eu-nl'
| 'ap-sg'
| 'ap-ca'
| 'ap-au'
| 'fra'
| 'nyc'
| 'sfo'
| 'blr'
| 'lon'
| 'ams'
| 'sgp'
| 'tor'
| 'syd'
| 'default'; //TODO: remove after migration

export type Region = {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/console/onboarding/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
id ?? ID.unique(),
name,
org.$id,
isCloud ? 'eu-de' : 'default'
isCloud ? 'fra' : 'default'
);
await invalidate(Dependencies.ACCOUNT);
goto(`/console/project-${project.$id}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
$createProject = {
id: null,
name: null,
region: 'eu-de'
region: 'fra'
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const load: PageLoad = async ({ params, parent }) => {

const queries: string[] = [];

if (usage.projects.length > 0) {
if (usage?.projects?.length > 0) {
queries.push(
Query.equal(
'$id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export const createProject = writable<{
}>({
id: null,
name: null,
region: 'eu-de'
region: 'fra'
});

3 comments on commit b1957cb

@vercel
Copy link

@vercel vercel bot commented on b1957cb Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on b1957cb Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console-preview – ./

console-next.vercel.app
console-preview-git-main-appwrite.vercel.app
console-preview-appwrite.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b1957cb Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console-cloud – ./

console-cloud-git-main-appwrite.vercel.app
console-cloud.vercel.app
console-cloud-appwrite.vercel.app

Please sign in to comment.