Fix props use before props definition

This commit is contained in:
Leo Vasanko 2023-11-13 08:12:58 -08:00
parent 19a5c4ad8a
commit e4a62e1197

View File

@ -41,6 +41,10 @@ const documentStore = useDocumentStore()
const showSearchInput = ref<boolean>(false) const showSearchInput = ref<boolean>(false)
const search = ref<HTMLInputElement | null>() const search = ref<HTMLInputElement | null>()
const searchButton = ref<HTMLButtonElement | null>() const searchButton = ref<HTMLButtonElement | null>()
const props = defineProps<{
path: Array<string>
query: string
}>()
const closeSearch = (ev: Event) => { const closeSearch = (ev: Event) => {
if (!showSearchInput.value) return // Already closing if (!showSearchInput.value) return // Already closing
@ -83,11 +87,6 @@ const settingsMenu = (e: Event) => {
items, items,
}) })
} }
const props = defineProps<{
path: Array<string>
query: string
}>()
defineExpose({ defineExpose({
toggleSearchInput, toggleSearchInput,
closeSearch, closeSearch,