Add parsing of AD1 files. Memorize window size and location.
This commit is contained in:
@@ -11,6 +11,7 @@ import {} from "react-error-boundary";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import ErrorBoundaryFallback from "./components/ErrorBoundaryFallback/ErrorBoundaryFallback";
|
||||
import Settings from "./components/Settings/Settings";
|
||||
import Home from "./components/Home/Home";
|
||||
|
||||
const App: React.FC = () => {
|
||||
const [user, setUser] = useState<User | null>(null);
|
||||
@@ -36,7 +37,7 @@ const App: React.FC = () => {
|
||||
<>
|
||||
<NavigationHeader />
|
||||
<Routes>
|
||||
<Route path="/" element={<div>AuthHome</div>} />
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="settings" element={<Settings />} />
|
||||
</Routes>
|
||||
</>
|
||||
|
||||
21
src/renderer/src/components/Home/Home.tsx
Normal file
21
src/renderer/src/components/Home/Home.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Button } from "antd";
|
||||
import ipcTypes from "../../../../util/ipcTypes.json";
|
||||
|
||||
const Home: React.FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1>Home</h1>
|
||||
<Button
|
||||
onClick={(): void => {
|
||||
window.electron.ipcRenderer.send(
|
||||
ipcTypes.toMain.debug.decodeEstimate
|
||||
);
|
||||
}}
|
||||
>
|
||||
Test Decode Estimate
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
@@ -16,7 +16,7 @@ const SettingsWatchedPaths: React.FC = () => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const handleAddPath = () => {
|
||||
const handleAddPath = (): void => {
|
||||
window.electron.ipcRenderer
|
||||
.invoke(ipcTypes.toMain.settings.filepaths.add)
|
||||
.then((paths: string[]) => {
|
||||
@@ -24,7 +24,7 @@ const SettingsWatchedPaths: React.FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleRemovePath = (path: string) => {
|
||||
const handleRemovePath = (path: string): void => {
|
||||
window.electron.ipcRenderer
|
||||
.invoke(ipcTypes.toMain.settings.filepaths.remove, path)
|
||||
.then((paths: string[]) => {
|
||||
|
||||
Reference in New Issue
Block a user