aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/+page.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-07 21:16:25 -0800
committerAdam Soltys <[email protected]>2024-11-08 09:27:40 -0800
commit32fcc461cd43c8907df5e306d520bb671307eab1 (patch)
tree0253780c569998b6c1a5f43026586e94916c3fee /src/routes/+page.svelte
parentbe5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff)
downloadcoinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz
coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip
svelte 5
Diffstat (limited to 'src/routes/+page.svelte')
-rw-r--r--src/routes/+page.svelte26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index a04d669e..480ea1c4 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,4 +1,6 @@
<script>
+ import { run } from 'svelte/legacy';
+
import LandingHeader from "$comp/LandingHeader.svelte";
import LandingHero from "$comp/LandingHero.svelte";
import LandingInfoCard from "$comp/LandingInfoCard.svelte";
@@ -11,14 +13,16 @@
import { locale, t } from "$lib/translations";
import { onDestroy, onMount, tick } from "svelte";
- export let data;
- let { faqs, locations, user } = data;
+ let { data } = $props();
+ let { faqs, locations, user } = $state(data);
let update = (data) => ({ faqs, locations, user } = data);
- $: update(data);
+ run(() => {
+ update(data);
+ });
- let howItWorks;
- let faq;
- let about;
+ let howItWorks = $state();
+ let faq = $state();
+ let about = $state();
const howItWorksSteps = [
{ image: "coinos:hand", stepID: "step1" },
@@ -26,7 +30,7 @@
{ image: "coinos:smile", stepID: "step3" },
];
- let loaded;
+ let loaded = $state();
let observer;
@@ -66,8 +70,8 @@
title={$t("landing.info3.title")}
description={$t("landing.info3.description")}
/>
- <div bind:this={howItWorks} />
- <div id="about" />
+ <div bind:this={howItWorks}></div>
+ <div id="about"></div>
</div>
<div>
@@ -79,7 +83,7 @@
<HowItWorksCard image={step.image} stepID={step.stepID} />
{/each}
</div>
- <div bind:this={faq} />
+ <div bind:this={faq}></div>
</div>
<div>
@@ -91,7 +95,7 @@
<FaqCard questionID={f} />
{/each}
</div>
- <div bind:this={about} />
+ <div bind:this={about}></div>
</div>
<About />