Skip to content

Commit 6867b35

Browse files
committed
chore: rename CREATE_ORGANIZATION dependency to ORGANIZATIONS
ORGANIZATIONS is clearer because it refers to the resource for the dependency. So, any time the ORGANLIZATIONS (list) needs to be refreshed, the this dependency can be invalidated.
1 parent 782e8e6 commit 6867b35

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export enum Dependencies {
1818
INVOICES = 'dependency:invoices',
1919
ADDRESS = 'dependency:address',
2020
UPGRADE_PLAN = 'dependency:upgrade_plan',
21-
CREATE_ORGANIZATION = 'dependency:create_organization',
21+
ORGANIZATIONS = 'dependency:organizations',
2222
PAYMENT_METHODS = 'dependency:paymentMethods',
2323
ORGANIZATION = 'dependency:organization',
2424
MEMBERS = 'dependency:members',

src/routes/(console)/create-organization/+page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Organization } from '$lib/stores/organization';
66

77
export const load: PageLoad = async ({ url, parent, depends }) => {
88
const { organizations } = await parent();
9-
depends(Dependencies.CREATE_ORGANIZATION);
9+
depends(Dependencies.ORGANIZATIONS);
1010

1111
const [coupon, paymentMethods] = await Promise.all([
1212
getCoupon(url),

src/routes/(console)/onboarding/create-organization/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
5151
// fixes an edge case where
5252
// the org is not available for some reason!
53-
await invalidate(Dependencies.CREATE_ORGANIZATION);
53+
await invalidate(Dependencies.ORGANIZATIONS);
5454
}
5555
isLoading = false;
5656
}

src/routes/+layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const ssr = false;
1616

1717
export const load: LayoutLoad = async ({ depends, url, route }) => {
1818
depends(Dependencies.ACCOUNT);
19-
depends(Dependencies.CREATE_ORGANIZATION);
19+
depends(Dependencies.ORGANIZATIONS);
2020

2121
const [account, error] = (await sdk.forConsole.account
2222
.get()

0 commit comments

Comments
 (0)