fix: minor 'workaround' to display the correct icon after refreshing the page when in dark mode

This commit is contained in:
Lucas Nunes 2024-02-05 16:21:51 -03:00
parent b0e1b55537
commit 09ec9f28e3

View File

@ -144,10 +144,13 @@ watch(() => $route.path, (n) => {
:variant="'ghost'"
:size="'icon'" @click="toggleDark()"
>
<!-- workaround for bug with component when refreshing the page -->
<component
:is="isDark ? RadixIconsSun : RadixIconsMoon"
:is="RadixIconsMoon"
v-if="!isDark"
class="w-[20px] h-5 text-foreground"
/>
<RadixIconsSun v-if="isDark" class="w-[20px] h-5 text-foreground" />
</Button>
</div>
</div>