diff --git a/src/lib/components/composer/ComposerForm.svelte b/src/lib/components/composer/ComposerForm.svelte index 0c3f9d0..c6fdd52 100644 --- a/src/lib/components/composer/ComposerForm.svelte +++ b/src/lib/components/composer/ComposerForm.svelte @@ -45,7 +45,7 @@ on: { NEXT: [ { - target: 'submitting', + target: 'summary', actions: assign({ formData: (context, event) => ({ ...context.formData, @@ -76,7 +76,7 @@ } } }, - submitting: { + summary: { on: { SUBMIT: 'submitted', PREV: { @@ -123,7 +123,7 @@ } const fieldValue = $form[currentFieldName]; - if ($state.matches('submitting')) { + if ($state.matches('summary')) { send('SUBMIT'); } else { send('NEXT', { fieldValue }); @@ -192,12 +192,20 @@ {/if} {/if} - {#if $state.matches('submitting')} + {#if $state.matches('summary')}
-

Summary

- {#each Object.entries($state.context.formData) as [key, value]} -

{key}: {value}

- {/each} +

Summary

+

Please verify your summary

+
+ {#each Object.entries($state.context.formData) as [key, value]} +
+ +
{key}
+
{value}
+
+
+ {/each} +
{/if} {#if $state.matches('submitted')}