Skip to content

Commit

Permalink
chore: Apply breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-oki committed Jan 14, 2025
1 parent 59e38bd commit c4576fb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/toolbox/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
ComponentProps,
FunctionComponent,
JSX,
PropsWithChildren,
useCallback,
useState,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Settings/Providers/components.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
Fragment,
FunctionComponent,
JSX,
useCallback,
useMemo,
useRef,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/System/Announcements/table.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/System/Status/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
FunctionComponent,
JSX,
PropsWithChildren,
ReactNode,
useCallback,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/utilities/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>) => {
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/utilities/validate.ts
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down

0 comments on commit c4576fb

Please sign in to comment.