Skip to content

Commit 5ac1c03

Browse files
author
Miguel Camba
committed
Fix flags
1 parent 5c41945 commit 5ac1c03

File tree

6 files changed

+3
-4
lines changed

6 files changed

+3
-4
lines changed

src/app.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<head>
44
<meta charset="utf-8" />
55
<link rel="icon" href="/favicon.png" />
6-
%svelte.head%
6+
%sveltekit.head%
77
<script async id="prism-script" src="/prism.js"></script>
88
<link rel="stylesheet" href="/prism.css">
99
</head>
1010
<body>
11-
<div id="svelte" class="text-dark">%svelte.body%</div>
11+
<div id="svelte" class="text-dark">%sveltekit.body%</div>
1212
</body>
1313
</html>

src/routes/[...lang]/__layout.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
}
2525
</script>
2626
<script lang="ts">
27-
const flags = import.meta.globEager('../../lib/flags/*.svg')
2827
$: lang = extractLanguageFromPath($page.url.pathname);
2928
$: {
3029
if ($locale !== lang) {
3130
$locale = lang;
3231
}
3332
}
3433
function flagFor(lang) {
35-
return flags[`../../lib/flags/${lang}.svg`].default
34+
return `/flags/${lang}.svg`;
3635
}
3736
3837
function setLocale(code) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)