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

Commit

Permalink
Clean up the code
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Sep 29, 2022
1 parent f31e9df commit 9ba30c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/VHeader/VHeaderMobile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import {
computed,
defineComponent,
inject,
provide,
ref,
useContext,
useRouter,
Expand All @@ -62,7 +61,9 @@ import { isSearchTypeSupported, useSearchStore } from '~/stores/search'
import VContentSettingsButton from '~/components/VHeader/VContentSettingsButton.vue'
import VLogoButton from '~/components/VHeader/VLogoButton.vue'
import VModal from '~/components/VModal/VModal.vue'
import VSearchBar from '~/components/VHeader/VSearchBar/VSearchBar.vue'
import VSearchTypes from '~/components/VContentSwitcher/VSearchTypes.vue'
import closeIcon from '~/assets/icons/close.svg'
Expand All @@ -80,7 +81,9 @@ export default defineComponent({
components: {
VContentSettingsButton,
VLogoButton,
VModal,
VSearchBar,
VSearchTypes,
},
setup() {
const mediaStore = useMediaStore()
Expand All @@ -93,8 +96,6 @@ export default defineComponent({
const isHeaderScrolled = inject('isHeaderScrolled', false)
const isMinScreenMd = isMinScreen('md', { shouldPassInSSR: true })
const headerHasTwoRows = inject('headerHasTwoRows')
provide('isMinScreenMd', isMinScreenMd)
const menuModalRef = ref(null)
Expand Down Expand Up @@ -196,7 +197,6 @@ export default defineComponent({
isHeaderScrolled,
isMinScreenMd,
isSearchRoute,
headerHasTwoRows,
areFiltersDisabled,
menuModalRef,
Expand Down
2 changes: 1 addition & 1 deletion src/components/VModal/VModal.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div ref="nodeRef">
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events -->
<div ref="triggerContainerRef" class="flex" @click="onTriggerClick">
<div ref="triggerContainerRef" @click="onTriggerClick">
<!--
@slot The trigger. Should be a button 99% of the time. If you need custom event handling on the trigger button, ensure bubbling is not prevented or else the dialog will not open.
@binding {object} a11yProps Props to v-bind to the trigger element to ensure accessibility
Expand Down
4 changes: 1 addition & 3 deletions src/composables/use-search-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const icons = {
[IMAGE]: imageIcon,
[VIDEO]: videoIcon,
[MODEL_3D]: model3dIcon,
} as const
}

export default function useSearchType() {
const activeType = computed(() => useSearchStore().searchType)
Expand Down Expand Up @@ -54,5 +54,3 @@ export default function useSearchType() {
additionalTypes,
}
}

export type UseSearchTypeReturn = ReturnType<typeof useSearchType>

0 comments on commit 9ba30c0

Please sign in to comment.