From ca9132ebaf75e29997454b7c38df3f5265d31322 Mon Sep 17 00:00:00 2001
From: Dean Sallinen <7519573+deansallinen@users.noreply.github.com>
Date: Wed, 18 Dec 2024 14:24:08 -0800
Subject: [PATCH] perf: improve asset loading
---
src/app.html | 1 +
src/routes/[network]/+layout.svelte | 16 +++++-----------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/app.html b/src/app.html
index e3a8b664..aeb26348 100644
--- a/src/app.html
+++ b/src/app.html
@@ -45,6 +45,7 @@
src: url('/fonts/inter/web-latin/Inter-Bold-subset.woff2?v=4.0') format('woff2');
}
+
%sveltekit.head%
diff --git a/src/routes/[network]/+layout.svelte b/src/routes/[network]/+layout.svelte
index fba40145..d7720f67 100644
--- a/src/routes/[network]/+layout.svelte
+++ b/src/routes/[network]/+layout.svelte
@@ -139,20 +139,14 @@
// set the flag to prevent banner showing on next load
localStorage.setItem('hide-v1-banner', 'true');
}
-
- // Deduplicate chain logos
- let logoSet = Array.from(new Set(chainLogos.values())).map(String);
-
+
- {#each logoSet as logoSrc}
- {#if logoSrc === chainLogos.get(String(data.network.chain.id))}
-
- {:else}
-
- {/if}
- {/each}
+ {#if chainLogos.get(String(data.network.chain.id)) !== undefined}
+ {@const chainLogo = String(chainLogos.get(String(data.network.chain.id)))}
+
+ {/if}
{#if showBanner}