diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 23a332e..958cbbe 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -19,6 +19,7 @@ import { PUBLIC_WISHES, } from '$env/static/public'; + import AOS from "aos"; //////////////// @@ -91,6 +92,12 @@ const siteKey = '0x4AAAAAAAdRXpX0iQ54gQNO'; onMount(() => { + AOS.init({ + // Global settings: + disable: false, // accepts following values: 'phone', 'tablet', 'mobile', boolean, expression or function + once: true + }); + AOS.refreshHard(); fetchData(); }); @@ -108,504 +115,26 @@ // } // } async function fetchData() { - const response = await fetch(PUBLIC_WISHES); + const response = await fetch("/Wishes.json"); if (response.ok) { const json = await response.json(); - Wishdata = json.body; - return { Wishdata }; - } else { - throw new Error(response.status as unknown as string); - } + Wishdata = json + return Wishdata + } }
- {#await promise} - - {:then { Wishdata }} - {#if Wishdata.accepting && !Wishdata.canreadnow} - - {:else if !Wishdata.accepting && !Wishdata.canreadnow} + - {:else if Wishdata.accepting && Wishdata.canreadnow} - - {:else} - - {/if} - {/await} +
{#await promise} - {#if !FirstTimeFetch} -
- -
-
{ - return async ({ update }) => { - update({ reset: false }); - }; - }} - method="POST" - class="mx-auto px-8" - id="form" - > -
- - -

- - -

- - -

- - - -

-

-
- - -