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 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