Skip to content

Commit

Permalink
refactor: ♻️ load SUPPORTED_LANGS from config
Browse files Browse the repository at this point in the history
  • Loading branch information
DerZade committed Sep 11, 2024
1 parent 4a4c215 commit ab8cf7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup>
import { onMounted } from 'vue'
import { useRouter } from 'vitepress'
import { useRouter, useData } from 'vitepress'

const router = useRouter();

const SUPPORTED_LANGS = ['de', 'en'];
const { site } = useData()
const SUPPORTED_LANGS = Object.keys(site.value.locales);

onMounted(() => {
const langs = window.navigator.languages.map(x => x.split('-')[0]);
Expand Down

0 comments on commit ab8cf7a

Please sign in to comment.