From 0f1d751e018c50b9376d9230d37095545203e174 Mon Sep 17 00:00:00 2001 From: afn Date: Mon, 27 Mar 2023 19:14:29 -0400 Subject: [PATCH] fix: disable buttons after submit --- src/routes/poll/+page.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/poll/+page.svelte b/src/routes/poll/+page.svelte index cda29fb..fa11981 100644 --- a/src/routes/poll/+page.svelte +++ b/src/routes/poll/+page.svelte @@ -106,7 +106,7 @@ }); function previousPage() { - if (currentPage <= 0) return null; + if (currentPage <= 0 || submitted) return null; currentPage--; submit = false; transitionDirection = -5; @@ -114,7 +114,7 @@ } function nextPage() { - if (currentPage >= logoPages || submit) return null; + if (currentPage >= logoPages || submitted) return null; currentPage++; transitionDirection = 5; window.scrollTo({ top: 0, left: 0, behavior: 'smooth' }); @@ -220,7 +220,7 @@ {/if} - + {#if submitted} Vote casted