updated language loading changes on all pages

This commit is contained in:
Henri
2026-04-08 00:13:42 +03:00
parent 3d27217769
commit 438aa957a1
24 changed files with 749 additions and 534 deletions

View File

@@ -3,8 +3,8 @@
Section,
Grid,
} from "$components";
import { onMount } from "svelte";
import { text } from "$lib/i18n";
import { onMount, onDestroy } from "svelte";
import { createPageTextStore } from "$lib";
import yaml from 'js-yaml';
import { MapLibre, Marker } from "svelte-maplibre";
@@ -35,12 +35,17 @@
// Load pricing data
let pricingData = { services: [] };
const text = createPageTextStore("Helpdesk");
onMount(async () => {
const response = await fetch('/_data/helpdesk/hinnakiri.yml');
const yamlText = await response.text();
pricingData = yaml.load(yamlText);
});
onDestroy(() => {
text.destroy();
});
</script>
<div class="safe-area-navbar">