chore: Apply breaking changes

pull/2824/head
Anderson Shindy Oki 3 months ago
parent 59e38bdf63
commit c4576fb322

@ -1,6 +1,7 @@
import {
ComponentProps,
FunctionComponent,
JSX,
PropsWithChildren,
useCallback,
useState,

@ -1,6 +1,7 @@
import {
Fragment,
FunctionComponent,
JSX,
useCallback,
useMemo,
useRef,

@ -1,4 +1,4 @@
import { FunctionComponent, useMemo } from "react";
import { FunctionComponent, JSX, useMemo } from "react";
import { Anchor, Text } from "@mantine/core";
import { faWindowClose } from "@fortawesome/free-solid-svg-icons";
import { ColumnDef } from "@tanstack/react-table";

@ -1,5 +1,6 @@
import {
FunctionComponent,
JSX,
PropsWithChildren,
ReactNode,
useCallback,

@ -111,7 +111,7 @@ export function useThrottle<F extends GenericFunction>(fn: F, ms: number) {
const fnRef = useRef(fn);
fnRef.current = fn;
const timer = useRef<number>();
const timer = useRef<number>(undefined);
return useCallback(
(...args: Parameters<F>) => {
@ -153,7 +153,7 @@ export function useOnValueChange<T>(value: T, onChange: (value: T) => void) {
// Mantine's useInterval has some weird issues. This is a workaround.
export function useInterval(fn: VoidFunction, ms: number) {
const timer = useRef<number>();
const timer = useRef<number>(undefined);
useEffect(() => {
timer.current = window.setInterval(fn, ms);

@ -1,10 +1,3 @@
import { ReactText } from "react";
import { isNumber, isString } from "lodash";
export function isReactText(v: unknown): v is ReactText {
return isString(v) || isNumber(v);
}
export function isMovie(v: object): v is Item.Movie {
return "radarrId" in v;
}

Loading…
Cancel
Save