fix: fixing download sources migration

This commit is contained in:
Chubby Granny Chaser 2024-12-23 00:06:23 +00:00
parent c9c6d5ee46
commit 1fd930b0a3
No known key found for this signature in database

View File

@ -2,11 +2,9 @@ import { Badge } from "@renderer/components";
import type { DownloadSource } from "@types";
import cn from "classnames";
import { useAppDispatch, useAppSelector, useRepacks } from "@renderer/hooks";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { SearchIcon, XIcon } from "@primer/octicons-react";
import { XIcon } from "@primer/octicons-react";
import "./catalogue.scss";
@ -34,8 +32,6 @@ export default function Catalogue() {
const abortControllerRef = useRef<AbortController | null>(null);
const [focused, setFocused] = useState(false);
const [steamUserTags, setSteamUserTags] = useState<any>({});
const [searchParams] = useSearchParams();
@ -105,18 +101,6 @@ export default function Catalogue() {
});
}, [getRepacksForObjectId]);
const focusInput = useCallback(() => {
setFocused(true);
inputRef.current?.focus();
}, []);
const onSearch = useCallback(
(value: string) => {
dispatch(setSearch({ title: value }));
},
[dispatch]
);
useEffect(() => {
axios
.get(
@ -133,12 +117,6 @@ export default function Catalogue() {
});
}, [i18n.language]);
useEffect(() => {
if (search) {
focusInput();
}
}, [search, focusInput]);
return (
<div className="catalogue">
<div