fix(web): reset search history after logout (#17534)

fix(web): reset search suggestions after logout
This commit is contained in:
Ben
2025-04-10 16:34:45 -04:00
committed by GitHub
parent 75c83cb704
commit 92f0973a46
7 changed files with 41 additions and 28 deletions
-6
View File
@@ -1,6 +0,0 @@
import { persisted } from 'svelte-persisted-store';
import { writable } from 'svelte/store';
export const savedSearchTerms = persisted<string[]>('search-terms', [], {});
export const isSearchEnabled = writable<boolean>(false);
export const preventRaceConditionSearchBar = writable<boolean>(false);
+13
View File
@@ -0,0 +1,13 @@
class SearchStore {
savedSearchTerms = $state<string[]>([]);
isSearchEnabled = $state(false);
preventRaceConditionSearchBar = $state(false);
clearCache() {
this.savedSearchTerms = [];
this.isSearchEnabled = false;
this.preventRaceConditionSearchBar = false;
}
}
export const searchStore = new SearchStore();