fix: disable buttons after submit

This commit is contained in:
afn 2023-03-27 19:14:29 -04:00
parent 4397105055
commit 0f1d751e01

View File

@ -106,7 +106,7 @@
}); });
function previousPage() { function previousPage() {
if (currentPage <= 0) return null; if (currentPage <= 0 || submitted) return null;
currentPage--; currentPage--;
submit = false; submit = false;
transitionDirection = -5; transitionDirection = -5;
@ -114,7 +114,7 @@
} }
function nextPage() { function nextPage() {
if (currentPage >= logoPages || submit) return null; if (currentPage >= logoPages || submitted) return null;
currentPage++; currentPage++;
transitionDirection = 5; transitionDirection = 5;
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }); window.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
@ -220,7 +220,7 @@
</div> </div>
{/if} {/if}
<Modal bind:modalOpen={submitModal}> <Modal bind:modalOpen={`su`bmitModal}>
<svelte:fragment slot="title"> <svelte:fragment slot="title">
{#if submitted} {#if submitted}
Vote casted Vote casted