mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 18:20:47 +01:00
Add i18n support for data
This commit is contained in:
@@ -35,8 +35,15 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import useClient from '../../composables/useClient';
|
||||
import useLocale from '~/composables/useLocale';
|
||||
|
||||
const { client } = useClient();
|
||||
const runes = (await client.perks.listAsync({locale: "default", version: "latest"}))
|
||||
.sort((a, b) => a.id - b.id);
|
||||
const { currentLocale } = useLocale();
|
||||
const getRunes = async () => (await client.perks.listAsync({locale: currentLocale.value, version: "latest"}))
|
||||
.sort((a, b) => a.id - b.id)
|
||||
|
||||
const runes = ref(await getRunes());
|
||||
watch(currentLocale, async() => {
|
||||
runes.value = await getRunes();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user