From 731ef6a9aa842bcb6e2ba74e1746ba868c988cd9 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sun, 19 Mar 2023 20:53:44 +0100 Subject: [PATCH] fix type errors (sort of) --- package.json | 2 +- src/index.tsx | 3 ++- src/video/components/parts/VideoErrorBoundary.tsx | 3 ++- yarn.lock | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3bbb9daf..20b814b5 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@types/react": "^17.0.39", "@types/react-dom": "^17.0.11", "@types/react-helmet": "^6.1.6", - "@types/react-router": "^5.1.18", + "@types/react-router": "^5.1.20", "@types/react-router-dom": "^5.3.3", "@types/react-stickynode": "^4.0.0", "@types/react-transition-group": "^4.4.5", diff --git a/src/index.tsx b/src/index.tsx index 7521d546..1ba12d5e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,7 +1,8 @@ import "core-js/stable"; -import React, { ReactNode, Suspense } from "react"; +import React, { Suspense } from "react"; import ReactDOM from "react-dom"; import { BrowserRouter, HashRouter } from "react-router-dom"; +import type { ReactNode } from "react-router-dom/node_modules/@types/react/index"; import { ErrorBoundary } from "@/components/layout/ErrorBoundary"; import { conf } from "@/setup/config"; import { registerSW } from "virtual:pwa-register"; diff --git a/src/video/components/parts/VideoErrorBoundary.tsx b/src/video/components/parts/VideoErrorBoundary.tsx index 7db5c1d4..58e7c13d 100644 --- a/src/video/components/parts/VideoErrorBoundary.tsx +++ b/src/video/components/parts/VideoErrorBoundary.tsx @@ -2,7 +2,8 @@ import { MWMediaMeta } from "@/backend/metadata/types"; import { ErrorMessage } from "@/components/layout/ErrorBoundary"; import { Link } from "@/components/text/Link"; import { conf } from "@/setup/config"; -import { Component, ReactNode } from "react"; +import { Component } from "react"; +import type { ReactNode } from "react-router-dom/node_modules/@types/react/index"; import { Trans } from "react-i18next"; import { VideoPlayerHeader } from "./VideoPlayerHeader"; diff --git a/yarn.lock b/yarn.lock index bcb7cac0..1c29c291 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1467,7 +1467,7 @@ "@types/react" "*" "@types/react-router" "*" -"@types/react-router@*", "@types/react-router@^5.1.18": +"@types/react-router@*", "@types/react-router@^5.1.20": version "5.1.20" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.20.tgz#88eccaa122a82405ef3efbcaaa5dcdd9f021387c" integrity sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==