Skip to content

Commit

Permalink
Respect the initial value of isDarkModeEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Dec 3, 2024
1 parent ae1b7e0 commit ad5a688
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref } from "vue";
import { onMounted, ref } from "vue";
import { useGettext } from "vue3-gettext";
import ToggleButton from "primevue/togglebutton";
Expand All @@ -21,6 +21,12 @@ function toggleDarkMode() {
);
isDarkModeEnabled.value = !isDarkModeEnabled.value;
}
onMounted(() => {
if (isDarkModeEnabled.value) {
toggleDarkMode();
}
});
</script>

<template>
Expand Down

0 comments on commit ad5a688

Please sign in to comment.