mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
fix: fixing download sources migration
This commit is contained in:
parent
c9c6d5ee46
commit
1fd930b0a3
@ -2,11 +2,9 @@ import { Badge } from "@renderer/components";
|
|||||||
|
|
||||||
import type { DownloadSource } from "@types";
|
import type { DownloadSource } from "@types";
|
||||||
|
|
||||||
import cn from "classnames";
|
|
||||||
|
|
||||||
import { useAppDispatch, useAppSelector, useRepacks } from "@renderer/hooks";
|
import { useAppDispatch, useAppSelector, useRepacks } from "@renderer/hooks";
|
||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { SearchIcon, XIcon } from "@primer/octicons-react";
|
import { XIcon } from "@primer/octicons-react";
|
||||||
|
|
||||||
import "./catalogue.scss";
|
import "./catalogue.scss";
|
||||||
|
|
||||||
@ -34,8 +32,6 @@ export default function Catalogue() {
|
|||||||
|
|
||||||
const abortControllerRef = useRef<AbortController | null>(null);
|
const abortControllerRef = useRef<AbortController | null>(null);
|
||||||
|
|
||||||
const [focused, setFocused] = useState(false);
|
|
||||||
|
|
||||||
const [steamUserTags, setSteamUserTags] = useState<any>({});
|
const [steamUserTags, setSteamUserTags] = useState<any>({});
|
||||||
|
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
@ -105,18 +101,6 @@ export default function Catalogue() {
|
|||||||
});
|
});
|
||||||
}, [getRepacksForObjectId]);
|
}, [getRepacksForObjectId]);
|
||||||
|
|
||||||
const focusInput = useCallback(() => {
|
|
||||||
setFocused(true);
|
|
||||||
inputRef.current?.focus();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const onSearch = useCallback(
|
|
||||||
(value: string) => {
|
|
||||||
dispatch(setSearch({ title: value }));
|
|
||||||
},
|
|
||||||
[dispatch]
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
axios
|
axios
|
||||||
.get(
|
.get(
|
||||||
@ -133,12 +117,6 @@ export default function Catalogue() {
|
|||||||
});
|
});
|
||||||
}, [i18n.language]);
|
}, [i18n.language]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (search) {
|
|
||||||
focusInput();
|
|
||||||
}
|
|
||||||
}, [search, focusInput]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="catalogue">
|
<div className="catalogue">
|
||||||
<div
|
<div
|
||||||
|
Loading…
Reference in New Issue
Block a user