revert: "feat: display i18n text on SSR"

This reverts commit cafc995dde.
This commit is contained in:
三咲智子 Kevin Deng 2023-01-13 02:35:26 +08:00
parent e9dccc9ef5
commit a41a31732b
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 11 additions and 10 deletions

View file

@ -3,6 +3,7 @@ const query = ref('')
const { accounts, hashtags, loading, statuses } = useSearch(query)
const index = ref(0)
const { t } = useI18n()
const el = ref<HTMLElement>()
const router = useRouter()
const { focused } = useFocusWithin(el)
@ -65,7 +66,7 @@ const activate = () => {
bg-transparent
outline="focus:none"
pe-4
:placeholder="$t('nav.search')"
:placeholder="isHydrated ? t('nav.search') : ''"
pb="1px"
placeholder-text-secondary
@keydown.down.prevent="shift(1)"
@ -77,7 +78,7 @@ const activate = () => {
<div left-0 top-12 absolute w-full z10 group-focus-within="pointer-events-auto visible" invisible pointer-events-none>
<div w-full bg-base border="~ base" rounded-3 max-h-100 overflow-auto py2>
<span v-if="query.trim().length === 0" block text-center text-sm text-secondary>
{{ $t('search.search_desc') }}
{{ t('search.search_desc') }}
</span>
<template v-else-if="!loading">
<template v-if="results.length > 0">
@ -89,7 +90,7 @@ const activate = () => {
/>
</template>
<span v-else block text-center text-sm text-secondary>
{{ $t('search.search_empty') }}
{{ t('search.search_empty') }}
</span>
</template>
<div v-else>