mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Fix type issues (#4176)
This commit is contained in:
@@ -107,7 +107,7 @@ export const ListFilter: React.FC<IListFilterProps> = ({
|
||||
// clear search input when filter is cleared
|
||||
useEffect(() => {
|
||||
if (!filter.searchTerm) {
|
||||
queryRef.current.value = "";
|
||||
if (queryRef.current) queryRef.current.value = "";
|
||||
setQueryClearShowing(false);
|
||||
}
|
||||
}, [filter.searchTerm, queryRef]);
|
||||
@@ -139,7 +139,7 @@ export const ListFilter: React.FC<IListFilterProps> = ({
|
||||
}
|
||||
|
||||
function onClearQuery() {
|
||||
queryRef.current.value = "";
|
||||
if (queryRef.current) queryRef.current.value = "";
|
||||
searchQueryUpdated("");
|
||||
setQueryFocus();
|
||||
setQueryClearShowing(false);
|
||||
|
||||
@@ -181,8 +181,7 @@ export const MainNavbar: React.FC = () => {
|
||||
}, [configuration]);
|
||||
|
||||
// react-bootstrap typing bug
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const navbarRef = useRef<any>();
|
||||
const navbarRef = useRef<HTMLElement | null>(null);
|
||||
const intl = useIntl();
|
||||
|
||||
const maybeCollapse = useCallback(
|
||||
|
||||
@@ -3,8 +3,7 @@ import { FormattedMessage } from "react-intl";
|
||||
|
||||
interface IDetailItem {
|
||||
id?: string | null;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
value?: any;
|
||||
value?: React.ReactNode;
|
||||
title?: string;
|
||||
fullWidth?: boolean;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ export class ObjectListScrapeResult<
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function hasScrapedValues(values: ScrapeResult<any>[]) {
|
||||
export function hasScrapedValues(values: { scraped: boolean }[]): boolean {
|
||||
return values.some((r) => r.scraped);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import StudioModal from "../scenes/StudioModal";
|
||||
import { faTags } from "@fortawesome/free-solid-svg-icons";
|
||||
import { useStudioCreate } from "src/core/StashService";
|
||||
import { useIntl } from "react-intl";
|
||||
import { apolloError } from "src/utils";
|
||||
|
||||
interface IStashSearchResultProps {
|
||||
studio: GQL.SlimStudioDataFragment;
|
||||
@@ -75,9 +76,8 @@ const StashSearchResult: React.FC<IStashSearchResultProps> = ({
|
||||
});
|
||||
input.parent_id = parentRes.data?.studioCreate?.id;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (e: any) {
|
||||
handleSaveError(parentInput.name, e.message ?? "");
|
||||
} catch (e) {
|
||||
handleSaveError(parentInput.name, apolloError(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import StudioConfig from "./Config";
|
||||
import { LOCAL_FORAGE_KEY, ITaggerConfig, initialConfig } from "../constants";
|
||||
import StudioModal from "../scenes/StudioModal";
|
||||
import { useUpdateStudio } from "../queries";
|
||||
import { apolloError } from "src/utils";
|
||||
import { faStar, faTags } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
type JobFragment = Pick<
|
||||
@@ -431,9 +432,8 @@ const StudioTaggerList: React.FC<IStudioTaggerListProps> = ({
|
||||
});
|
||||
input.parent_id = parentRes.data?.studioCreate?.id;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (e: any) {
|
||||
handleSaveError(studioID, parentInput.name, e.message ?? "");
|
||||
} catch (e) {
|
||||
handleSaveError(studioID, parentInput.name, apolloError(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user