mirror of
https://github.com/felixrieseberg/windows95.git
synced 2026-05-12 01:21:59 +00:00
build: Update Electron & React
This commit is contained in:
14
src/renderer/utils/get-state-path.ts
Normal file
14
src/renderer/utils/get-state-path.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { IPC_COMMANDS } from '../../constants';
|
||||
|
||||
let _statePath = '';
|
||||
|
||||
export async function getStatePath(): Promise<string> {
|
||||
if (_statePath) {
|
||||
return _statePath;
|
||||
}
|
||||
|
||||
const statePath = await ipcRenderer.invoke(IPC_COMMANDS.GET_STATE_PATH);
|
||||
return _statePath = statePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user