Skip to content

Commit 2e41bec

Browse files
committed
🐛 修复打开的文件被显示成草稿的问题
1 parent fd1a4ca commit 2e41bec

File tree

2 files changed

+254
-256
lines changed

2 files changed

+254
-256
lines changed

app/src/main.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import "./polyfills/roundRect";
3838
import { exists } from "./utils/fs";
3939
import { exit, writeStderr } from "./utils/otherApi";
4040
import { getCurrentWindow, isDesktop, isFrame, isWeb, isWindows } from "./utils/platform";
41+
import { Provider } from "jotai";
42+
import { store } from "./state";
4143

4244
/**
4345
* @private
@@ -202,6 +204,10 @@ async function renderApp(cli: boolean = false) {
202204
await getCurrentWindow().setSkipTaskbar(true);
203205
root.render(<></>);
204206
} else {
205-
root.render(<Routes />);
207+
root.render(
208+
<Provider store={store}>
209+
<Routes />
210+
</Provider>,
211+
);
206212
}
207213
}

0 commit comments

Comments
 (0)