🐛 Fixed search
This commit is contained in:
@@ -13,8 +13,7 @@
|
||||
import { getLocalization } from '$lib/i18n';
|
||||
const { t } = getLocalization();
|
||||
import SearchCard from '$lib/search-card.svelte';
|
||||
import { createQueryParamsStore } from '$lib/stores';
|
||||
const search_term = createQueryParamsStore('q');
|
||||
let search_term = '';
|
||||
let resp_data = null;
|
||||
|
||||
const submit = async () => {
|
||||
@@ -24,7 +23,7 @@
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
q: $search_term,
|
||||
q: search_term,
|
||||
attributesToHighlight: ['*']
|
||||
})
|
||||
});
|
||||
@@ -57,12 +56,12 @@
|
||||
placeholder={$t('search_page.at_least_3_characters')}
|
||||
aria-label="Search"
|
||||
aria-describedby="button-addon2"
|
||||
bind:value={$search_term}
|
||||
bind:value={search_term}
|
||||
/>
|
||||
<button
|
||||
class="inline-block px-6 py-2.5 bg-blue-600 text-white font-medium text-xs leading-tight uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out flex items-center disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
id="button-addon2"
|
||||
disabled={$search_term.length <= 2}
|
||||
disabled={search_term.length <= 2}
|
||||
type="submit"
|
||||
>
|
||||
<svg
|
||||
|
||||
Reference in New Issue
Block a user