mirror of
https://github.com/KevinMidboe/seasoned.git
synced 2026-03-09 19:09:07 +00:00
Only search when query has length
This commit is contained in:
@@ -61,8 +61,9 @@
|
||||
}
|
||||
|
||||
function fetchTorrents() {
|
||||
loading.value = true;
|
||||
if (!props.query?.length) return;
|
||||
|
||||
loading.value = true;
|
||||
searchTorrents(props.query)
|
||||
.then(torrentResponse => setTorrents(torrentResponse?.results))
|
||||
.then(() => updateResultCountDisplay())
|
||||
|
||||
@@ -82,9 +82,9 @@ export function humanMinutes(minutes) {
|
||||
return `${hours}h ${minutesLeft}m`;
|
||||
}
|
||||
|
||||
export function getValueFromUrlQuery(queryParameter: string): string | null {
|
||||
export function getValueFromUrlQuery(queryParameter: string): string {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
return params.get(queryParameter) || null;
|
||||
return params.get(queryParameter) || "";
|
||||
}
|
||||
|
||||
export function setUrlQueryParameter(parameter: string, value: string): void {
|
||||
|
||||
Reference in New Issue
Block a user