Skip to content

Commit ea2e749

Browse files
authored
Merge pull request #2061 from appwrite/fix-previous-url
2 parents 0b87038 + 035afa7 commit ea2e749

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/lib/layout/wizard.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@
5050
if (confirmExit) {
5151
showExitModal = true;
5252
} else {
53-
goto(href);
53+
goBack();
5454
trackEvent('wizard_exit', {
5555
from: 'escape'
5656
});
5757
}
5858
}
5959
}
6060
61+
const goBack = () => goto(href);
62+
6163
onMount(() => ($isNewWizardStatusOpen = true));
6264
6365
onDestroy(() => ($isNewWizardStatusOpen = false));
@@ -77,7 +79,7 @@
7779
if (confirmExit) {
7880
showExitModal = true;
7981
} else {
80-
goto(href);
82+
goBack();
8183
trackEvent('wizard_exit', {
8284
from: 'button'
8385
});

src/routes/(console)/organization-[organization]/change-plan/+page.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,7 @@
271271
<title>Change plan - Appwrite</title>
272272
</svelte:head>
273273

274-
<Wizard
275-
title="Change plan"
276-
href={`${base}/organization-${page.params.organization}`}
277-
bind:showExitModal
278-
confirmExit>
274+
<Wizard title="Change plan" href={previousPage} bind:showExitModal confirmExit>
279275
<Form bind:this={formComponent} onSubmit={handleSubmit} bind:isSubmitting>
280276
<Layout.Stack gap="xxl">
281277
<Fieldset legend="Select plan">

src/routes/(console)/organization-[organization]/usage/[[invoice]]/totalMembers.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</Button>
5353
</Layout.Stack>
5454
</div>
55-
<Paginator items={members.memberships} hideFooter={members?.total <= 5}>
55+
<Paginator items={members?.memberships} hideFooter={members?.total <= 5}>
5656
{#snippet children(paginatedItems: typeof members.memberships)}
5757
<Table.Root columns={2} let:root>
5858
<svelte:fragment slot="header" let:root>

src/routes/(console)/project-[region]-[project]/auth/security/updateSessionLength.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
import { createTimeUnitPair } from '$lib/helpers/unit';
88
import { addNotification } from '$lib/stores/notifications';
99
import { sdk } from '$lib/stores/sdk';
10-
import { project } from '../../store';
10+
import { project as projectStore } from '../../store';
1111
import { Layout } from '@appwrite.io/pink-svelte';
12+
import { page } from '$app/state';
1213
13-
const { value, unit, baseValue, units } = createTimeUnitPair($project?.authDuration);
14-
const options = units.map((v) => ({ label: v.name, value: v.name }));
14+
const project = $derived($projectStore ?? page.data?.project);
15+
const { value, unit, baseValue, units } = $derived(createTimeUnitPair(project?.authDuration));
16+
const options = $derived(units.map((v) => ({ label: v.name, value: v.name })));
1517
1618
async function updateSessionLength() {
1719
try {
@@ -43,7 +45,7 @@
4345
</Layout.Stack>
4446
</svelte:fragment>
4547
<svelte:fragment slot="actions">
46-
<Button disabled={$baseValue === $project.authDuration} on:click={updateSessionLength}>
48+
<Button disabled={$baseValue === project.authDuration} on:click={updateSessionLength}>
4749
Update
4850
</Button>
4951
</svelte:fragment>

0 commit comments

Comments
 (0)