Files
uTab/src/frontend/App.tsx
T
2025-04-18 09:52:27 -04:00

14 lines
562 B
TypeScript

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 />;
};