Skip to content

Commit 403ae5c

Browse files
committed
fix: invalid calls.
1 parent 1b72479 commit 403ae5c

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/routes/(console)/organization-[organization]/settings/BAAModal.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { page } from '$app/stores';
32
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
43
import { Modal } from '$lib/components';
54
import { Button, FormList, InputEmail, InputSelect, InputText } from '$lib/elements/forms';
@@ -40,10 +39,10 @@
4039
let error: string;
4140
4241
onMount(async () => {
43-
const countryList = await sdk
44-
.forProject($page.params.region, $page.params.project)
45-
.locale.listCountries();
46-
const locale = await sdk.forProject($page.params.region, $page.params.project).locale.get();
42+
/* use console sdk as project is not always available here. */
43+
const locale = await sdk.forConsole.locale.get();
44+
const countryList = await sdk.forConsole.locale.listCountries();
45+
4746
if (locale.countryCode) {
4847
country = locale.countryCode;
4948
}

src/routes/(console)/organization-[organization]/settings/Soc2Modal.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { page } from '$app/stores';
32
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
43
import { Modal } from '$lib/components';
54
import { FormList, InputEmail, InputSelect, InputText } from '$lib/elements/forms';
@@ -41,10 +40,10 @@
4140
let error: string;
4241
4342
onMount(async () => {
44-
const countryList = await sdk
45-
.forProject($page.params.region, $page.params.project)
46-
.locale.listCountries();
47-
const locale = await sdk.forProject($page.params.region, $page.params.project).locale.get();
43+
/* use console sdk as project is not always available here. */
44+
const locale = await sdk.forConsole.locale.get();
45+
const countryList = await sdk.forConsole.locale.listCountries();
46+
4847
if (locale.countryCode) {
4948
country = locale.countryCode;
5049
}

0 commit comments

Comments
 (0)