mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: old region issue, wrap address in if
This commit is contained in:
1 parent
9fc2d5c7fa
commit
bf0965907c
2 files changed
+12
-6
No files matched your search
@@ -131,6 +131,7 @@
|
||||
});
|
||||
|
||||
function findRegion(project: Partial<Models.Project & { region: string }>) {
|
||||
console.log(project, regions);
|
||||
const region = regions.regions.find((region) => region.$id === project.region);
|
||||
return region;
|
||||
}
|
||||
@@ -165,6 +166,9 @@
|
||||
offset={data.offset}
|
||||
on:click={handleCreateProject}>
|
||||
{#each data.projects.projects as project}
|
||||
{@const platforms = filterPlatforms(
|
||||
project.platforms.map((platform) => getPlatformInfo(platform.type))
|
||||
)}
|
||||
<li>
|
||||
<GridItem1 href={`${base}/console/project-${project.$id}`}>
|
||||
<svelte:fragment slot="eyebrow">
|
||||
@@ -178,9 +182,7 @@
|
||||
<span class="icon-pause" aria-hidden="true" /> All services are disabled.
|
||||
</p>
|
||||
{/if}
|
||||
{@const platforms = filterPlatforms(
|
||||
project.platforms.map((platform) => getPlatformInfo(platform.type))
|
||||
)}
|
||||
|
||||
{#each platforms as platform, i}
|
||||
{#if i < 3}
|
||||
<Pill>
|
||||
@@ -198,7 +200,7 @@
|
||||
{#if isCloud && regions}
|
||||
{@const region = findRegion(project)}
|
||||
<span class="u-color-text-gray">
|
||||
{region.name}
|
||||
{region?.name}
|
||||
</span>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
@@ -155,8 +155,12 @@
|
||||
</svelte:fragment>
|
||||
</CardGrid>
|
||||
|
||||
<AddressModal bind:show={showCreate} organization={$organization?.$id} />
|
||||
<EditAddressModal bind:show={showEdit} bind:selectedAddress={billingAddress} />
|
||||
{#if showCreate}
|
||||
<AddressModal bind:show={showCreate} organization={$organization?.$id} />
|
||||
{/if}
|
||||
{#if showEdit}
|
||||
<EditAddressModal bind:show={showEdit} bind:selectedAddress={billingAddress} />
|
||||
{/if}
|
||||
{#if showReplace}
|
||||
<ReplaceAddress bind:show={showReplace} />
|
||||
{/if}
|
||||
Reference in new issue
Block a user