aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-27 08:30:49 -0700
committerAdam Soltys <[email protected]>2024-09-27 08:30:49 -0700
commit13196f5468deb53b1649c787c148350f8d6951b8 (patch)
treef7a23a1a689eaf75a1ea8e9839fc4b6e9154a307 /src
parentd744982aa7d6b7baf5649a04e21f492595c45717 (diff)
downloadcoinos-ui-13196f5468deb53b1649c787c148350f8d6951b8.tar.gz
coinos-ui-13196f5468deb53b1649c787c148350f8d6951b8.zip
preloading
Diffstat (limited to 'src')
-rw-r--r--src/app.html2
-rw-r--r--src/components/AppHeader.svelte10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/app.html b/src/app.html
index d2316082..ee2fd506 100644
--- a/src/app.html
+++ b/src/app.html
@@ -13,7 +13,7 @@
<link rel="manifest" href="/manifest.webmanifest" />
%sveltekit.head%
</head>
- <body>
+ <body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 541059f5..389e036b 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -49,7 +49,7 @@
>
<nav class="flex justify-end items-center space-x-4 p-5">
{#if user}
- <a href={`/${user.username}`}>
+ <a href={`/${user.username}`} data-sveltekit-preload-code="eager">
<button
class="bg-white p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl border border-black/10 {$page
.url.pathname === `/${user.username}`
@@ -58,7 +58,7 @@
><Icon icon="home" style="mx-auto w-6 sm:w-8" />
</button>
</a>
- <a href={`/invoice`}>
+ <a href={`/invoice`} data-sveltekit-preload-data="tap" data-sveltekit-preload-code="eager">
<button
class="bg-white p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl border border-black/10 {$page.url.pathname.includes(
'invoice'
@@ -68,7 +68,7 @@
><Icon icon="receive" style="mx-auto w-6 sm:w-8" />
</button>
</a>
- <a href={`/payments`}>
+ <a href={`/payments`} data-sveltekit-preload-code="eager">
<button
class="bg-white p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl border border-black/10 {$page
.url.pathname === `/payments`
@@ -89,7 +89,7 @@
{/if}
</button>
</a>
- <a href={`/send`}>
+ <a href={`/send`} data-sveltekit-preload-code="eager">
<button
class="bg-white p-2 rounded-full w-12 h-12 sm:w-16 sm:h-16 drop-shadow-xl border border-black/10 {$page
.url.pathname === `/send`
@@ -120,7 +120,7 @@
<ul class="space-y-5 w-48">
{#each menuButtons as { href, icon, key }}
<li>
- <a {href} data-sveltekit-prefetch="off">
+ <a {href} data-sveltekit-preload-code="eager">
<button
class="flex justify-center items-center font-semibold hover:opacity-80"
><Icon {icon} style="mr-2 w-6 sm:w-8" /> {$t(key)}