mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Fix billing address replacement modal using undefined project context (#2617)
Fix billing address replacement modal by using sdk.forConsole instead of sdk.forProject because project id is not available.
This commit is contained in:
@@ -150,7 +150,7 @@
|
||||
bind:selectedAddress={billingAddress} />
|
||||
{/if}
|
||||
{#if showReplace}
|
||||
<ReplaceAddress bind:show={showReplace} />
|
||||
<ReplaceAddress bind:show={showReplace} {locale} {countryList} />
|
||||
{/if}
|
||||
{#if showRemove}
|
||||
<RemoveAddress bind:show={showRemove} />
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { base } from '$app/paths';
|
||||
import { Alert, Badge, Card, Layout, Skeleton } from '@appwrite.io/pink-svelte';
|
||||
import { page } from '$app/state';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
export let show = false;
|
||||
export let locale: Models.Locale;
|
||||
export let countryList: Models.CountryList;
|
||||
let loading = true;
|
||||
let addresses: AddressesList;
|
||||
let selectedAddress: string;
|
||||
@@ -44,13 +46,9 @@
|
||||
: null
|
||||
: null;
|
||||
|
||||
const locale = await sdk.forProject(page.params.region, page.params.project).locale.get();
|
||||
if (locale?.countryCode) {
|
||||
country = locale.countryCode;
|
||||
}
|
||||
const countryList = await sdk
|
||||
.forProject(page.params.region, page.params.project)
|
||||
.locale.listCountries();
|
||||
options = countryList.countries.map((country) => {
|
||||
return {
|
||||
value: country.code,
|
||||
|
||||
Reference in New Issue
Block a user