Skip to content

Commit

Permalink
fix(types): no more window.ipc
Browse files Browse the repository at this point in the history
  • Loading branch information
ariscript committed Nov 23, 2021
1 parent db30ca6 commit 79296ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ declare global {
interface Window {
ipc: IpcChannels;
}
declare const ipc: IpcChannels;
}
2 changes: 1 addition & 1 deletion src/windows/MainWIndow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const MainWindow = () => {
<div>
<h1>Welcome to MultiServer</h1>
{/* TODO: add instances view */}
<button onClick={window.ipc.newInstanceWindow}>New Instance</button>
<button onClick={ipc.newInstanceWindow}>New Instance</button>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/windows/NewInstanceWIndow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const NewInstanceWindow = () => {
</option>
))}
</select>
<button onClick={window.ipc.createInstance}>Create</button>
<button onClick={ipc.createInstance}>Create</button>
</div>
);
};
Expand Down

0 comments on commit 79296ec

Please # to comment.