Skip to content

Commit 8908638

Browse files
fix api being undefined in theme handler
1 parent d404139 commit 8908638

File tree

1 file changed

+5
-4
lines changed
  • packages/app-desktop/src/lib/api

1 file changed

+5
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Theme } from "@darkwrite/common";
22

3-
const API = window.newApi.theme;
3+
// TODO: use a class
4+
//const API = window.newApi.theme;
45

56
export interface IThemesModel {
67
getUserThemes: () => Promise<Theme[]>;
@@ -9,7 +10,7 @@ export interface IThemesModel {
910
}
1011

1112
export const ThemesModel: IThemesModel = {
12-
getUserThemes: () => API.load(),
13-
importTheme: () => API.import(),
14-
getSystemAccentColor: () => API.getAccentColor(),
13+
getUserThemes: () => window.newApi.theme.load(),
14+
importTheme: () => window.newApi.theme.import(),
15+
getSystemAccentColor: () => window.newApi.theme.getAccentColor(),
1516
};

0 commit comments

Comments
 (0)