Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Unstuck searchStatus of search bar (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
krysal authored Feb 9, 2022
1 parent 823207e commit 2b85c66
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/VHeader/VHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import {
useContext,
useRouter,
watch,
watchEffect,
} from '@nuxtjs/composition-api'
import { MEDIA, SEARCH } from '~/constants/store-modules'
Expand Down Expand Up @@ -147,9 +146,8 @@ const VHeader = defineComponent({
/**
* Status is hidden below the medium breakpoint.
* It shows Loading... or Number of results on bigger screens.
* @returns {string}
*/
const setStatus = () => {
const searchStatus = computed(() => {
if (
!isMinScreenMd.value ||
!isSearchRoute.value ||
Expand All @@ -158,11 +156,7 @@ const VHeader = defineComponent({
return ''
if (isFetching.value) return i18n.t('header.loading')
return getI18nCount(resultsCount.value)
}
const searchStatus = ref(setStatus())
watchEffect(() => setStatus())
})
const localSearchTerm = ref(store.state.search.query.q)
const searchTerm = computed({
Expand Down

0 comments on commit 2b85c66

Please sign in to comment.