2023-03-06 08:32:00 -05:00
|
|
|
import 'i18n/config';
|
2023-03-06 07:21:29 -05:00
|
|
|
import { useEffect } from "react";
|
2023-03-04 06:19:24 -05:00
|
|
|
import { getCurrent } from "@tauri-apps/api/window";
|
2023-03-03 09:06:14 -05:00
|
|
|
import { Routes, Route } from "react-router-dom";
|
|
|
|
|
import { Layout } from "components/Layout";
|
|
|
|
|
import { Home } from "pages/Home";
|
2023-03-06 07:21:29 -05:00
|
|
|
import { Settings } from "pages/Settings";
|
2023-03-06 09:01:18 -05:00
|
|
|
import { Guide } from 'pages/Guide';
|
2023-03-03 07:03:08 -05:00
|
|
|
|
|
|
|
|
function App() {
|
2023-03-04 06:19:24 -05:00
|
|
|
useEffect(() => {
|
2023-03-06 07:21:29 -05:00
|
|
|
try {
|
|
|
|
|
getCurrent().show().catch(e => console.error(e))
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error(e)
|
|
|
|
|
}
|
2023-03-04 06:19:24 -05:00
|
|
|
}, [])
|
2023-03-03 07:03:08 -05:00
|
|
|
return (
|
2023-03-03 09:06:14 -05:00
|
|
|
<Routes>
|
|
|
|
|
<Route path='/' element={<Layout />}>
|
|
|
|
|
<Route index element={<Home />} />
|
2023-03-06 07:21:29 -05:00
|
|
|
<Route path='/settings' element={<Settings />} />
|
2023-03-06 09:01:18 -05:00
|
|
|
<Route path='/guide' element={<Guide />} />
|
2023-03-03 09:06:14 -05:00
|
|
|
</Route>
|
|
|
|
|
</Routes>
|
2023-03-03 07:03:08 -05:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|