forked from lapikud/lapikud.github.io
updated language loading changes on all pages
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user