diff --git a/renderer/browser-window/main.tsx b/renderer/browser-window/main.tsx index cbdb21e..038e131 100644 --- a/renderer/browser-window/main.tsx +++ b/renderer/browser-window/main.tsx @@ -49,7 +49,7 @@ interface State { } class App extends React.Component { - view?: Electron.BrowserView; + view: Electron.BrowserView | null; resizeObserver?: ResizeObserver; @@ -63,6 +63,8 @@ class App extends React.Component { title: "", isFav: false, }; + + this.view = null; } async componentDidMount() { @@ -76,7 +78,7 @@ class App extends React.Component { this.view?.setBounds({ x: 0, y: 0, height: 0, width: 0 }); this.view?.webContents.off("dom-ready", this.handleViewDOMReady); ipcRenderer.removeListener("viewReady", this.handleViewReady); - this.view = undefined; + this.view = null; this.resizeObserver?.disconnect(); } diff --git a/renderer/confirm-window/App.tsx b/renderer/confirm-window/App.tsx index e788398..86144e1 100644 --- a/renderer/confirm-window/App.tsx +++ b/renderer/confirm-window/App.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { ReactNode } from "react"; import WindowToolBar from "renderer/common/components/WindowToolBar"; interface Props {} @@ -10,7 +10,7 @@ class SettingWindow extends React.Component { super(props); } - render() { + render(): ReactNode { return (
{}}>是否确认 diff --git a/renderer/main-window/App.tsx b/renderer/main-window/App.tsx index 47dbcad..354a86c 100644 --- a/renderer/main-window/App.tsx +++ b/renderer/main-window/App.tsx @@ -18,7 +18,6 @@ import { import { ReactNode } from "react"; import { EllipsisOutlined } from "@ant-design/icons"; import { ipcGetStore } from "./utils"; -import FeedImage from "./assets/feed.png"; const { remote,