auto redirect
This commit is contained in:
parent
4249f3cfa7
commit
108438e2f6
1 changed files with 6 additions and 2 deletions
|
@ -10,11 +10,15 @@
|
||||||
|
|
||||||
/** @type {import('./$types').ActionData} */
|
/** @type {import('./$types').ActionData} */
|
||||||
export let form;
|
export let form;
|
||||||
|
let formBody, anchor;
|
||||||
|
|
||||||
|
$: if (anchor && form?.success && form?.href) {
|
||||||
|
anchor.click();
|
||||||
|
}
|
||||||
|
|
||||||
let uploadForm = {};
|
let uploadForm = {};
|
||||||
|
|
||||||
let formContent = $page.url.searchParams.get('init') || '';
|
let formContent = $page.url.searchParams.get('init') || '';
|
||||||
let formBody;
|
|
||||||
|
|
||||||
let currentState = 'editor';
|
let currentState = 'editor';
|
||||||
|
|
||||||
|
@ -76,7 +80,7 @@
|
||||||
<p>
|
<p>
|
||||||
{#if form?.success}
|
{#if form?.success}
|
||||||
{#if form?.href}
|
{#if form?.href}
|
||||||
<a href='{form?.href}'>{form?.success}</a>
|
<a href='{form?.href}' bind:this='{anchor}'>{form?.success}</a>
|
||||||
{:else}
|
{:else}
|
||||||
{form?.success}
|
{form?.success}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue