add IPC
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { NewTab } from './components/NewTab';
|
||||
import { useAtom } from 'jotai';
|
||||
import { backgroundImageState } from './state/backgroundImage.state';
|
||||
import { IpcService } from './services/ipcService';
|
||||
|
||||
export const App: React.FC = () => {
|
||||
const [backgroundImage] = useAtom(backgroundImageState)
|
||||
useEffect(() => { document.body.style.backgroundImage = `url(${backgroundImage})` }, [backgroundImage]);
|
||||
|
||||
IpcService.writeFile({ path: 'testpath', fileContent: 'testcontent' }).then(console.log)
|
||||
|
||||
return <NewTab />;
|
||||
};
|
||||
Reference in New Issue
Block a user