Skip to content

Commit

Permalink
fix: hydration mismatch on realtime chat page
Browse files Browse the repository at this point in the history
  • Loading branch information
sugarforever committed Jan 6, 2025
1 parent b4399e4 commit ae6e541
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pages/realtime/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ const realtimeChatEnabled = useStorage('realtimeChatEnabled', false)
<template>
<div class="flex items-center justify-center">
<div class="max-w-md w-full p-6">
<h1 class="text-2xl font-bold mb-4 text-center dark:text-gray-100">{{ t('menu.realtime') }}</h1>
<p v-if="realtimeChatEnabled" class="text-center text-gray-600 dark:text-gray-400">
Click the microphone indicator at the right edge of the page to start a voice conversation.
</p>
<p v-else class="text-center text-gray-600 dark:text-gray-400">
Please <NuxtLink to="/settings" class="text-primary hover:underline">enable realtime chat in settings</NuxtLink> to start voice conversations.
</p>
<ClientOnly>
<h1 class="text-2xl font-bold mb-4 text-center dark:text-gray-100">{{ t('menu.realtime') }}</h1>
<p v-if="realtimeChatEnabled" class="text-center text-gray-600 dark:text-gray-400">
Click the microphone indicator at the right edge of the page to start a voice conversation.
</p>
<p v-else class="text-center text-gray-600 dark:text-gray-400">
Please <NuxtLink to="/settings" class="text-primary hover:underline">enable realtime chat in settings</NuxtLink> to start voice conversations.
</p>
</ClientOnly>
</div>
</div>
</template>

0 comments on commit ae6e541

Please sign in to comment.