mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
feat: adding user tags
This commit is contained in:
parent
e78de55fe7
commit
a557bbb948
@ -23,6 +23,8 @@ import { steamUserTags } from "./steam-user-tags";
|
||||
export default function Catalogue() {
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const abortControllerRef = useRef<AbortController | null>(null);
|
||||
|
||||
const [focused, setFocused] = useState(false);
|
||||
|
||||
const [searchParams] = useSearchParams();
|
||||
@ -43,8 +45,16 @@ export default function Catalogue() {
|
||||
|
||||
useEffect(() => {
|
||||
setGames([]);
|
||||
abortControllerRef.current?.abort();
|
||||
|
||||
const abortController = new AbortController();
|
||||
abortControllerRef.current = abortController;
|
||||
|
||||
window.electron.searchGames(filters).then((games) => {
|
||||
if (abortController.signal.aborted) {
|
||||
return;
|
||||
}
|
||||
|
||||
setGames(games);
|
||||
});
|
||||
}, [filters]);
|
||||
|
Loading…
Reference in New Issue
Block a user