diff --git a/front/packages/models/src/resources/watch-info.ts b/front/packages/models/src/resources/watch-info.ts index 6c89cc75..de8d01d9 100644 --- a/front/packages/models/src/resources/watch-info.ts +++ b/front/packages/models/src/resources/watch-info.ts @@ -197,6 +197,7 @@ export const WatchInfoP = z // from https://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable-string const humanFileSize = (size: number): string => { var i = size == 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024)); + // @ts-ignore I'm not gonna fix stackoverflow's working code. return (size / Math.pow(1024, i)).toFixed(2) * 1 + " " + ["B", "kB", "MB", "GB", "TB"][i]; }; diff --git a/front/packages/primitives/src/image/fast-image.tsx b/front/packages/primitives/src/image/fast-image.tsx index 0bf2a885..fa3b800a 100644 --- a/front/packages/primitives/src/image/fast-image.tsx +++ b/front/packages/primitives/src/image/fast-image.tsx @@ -18,7 +18,6 @@ * along with Kyoo. If not, see . */ -import { ComponentProps } from "react"; import { View } from "react-native"; import FImage from "react-native-fast-image"; @@ -36,8 +35,8 @@ export const FastImage = ({ }: { src: string; alt: string; - width: number | string; - height: number | string; + width: number; + height: number; x: number; y: number; rows: number; diff --git a/front/packages/primitives/src/tooltip.ts b/front/packages/primitives/src/tooltip.ts index 0fe1693c..b332cc59 100644 --- a/front/packages/primitives/src/tooltip.ts +++ b/front/packages/primitives/src/tooltip.ts @@ -27,4 +27,4 @@ export const tooltip = (tooltip: string, up?: boolean) => ({ }); import type { Tooltip as RTooltip } from "react-tooltip"; -export declare const Tooltip: RTooltip; +export const Tooltip: typeof RTooltip = (() => null) as any; diff --git a/front/packages/ui/src/player/components/left-buttons.tsx b/front/packages/ui/src/player/components/left-buttons.tsx index dd8f6040..9de75102 100644 --- a/front/packages/ui/src/player/components/left-buttons.tsx +++ b/front/packages/ui/src/player/components/left-buttons.tsx @@ -127,7 +127,7 @@ export const TouchControls = ({ { columns: Math.max(...info.map((x) => x.x)) / last.width + 1, width: last.width, height: last.height, - } + } : null, } as const; };