Webview: add solid-toast feeback system

This commit is contained in:
Johannes Kirschbauer
2024-06-08 18:14:07 +02:00
parent 7a230062ef
commit 208a79fc4c
5 changed files with 30 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ import { createSignal, type Component } from "solid-js";
import { MachineProvider } from "./Config";
import { Layout } from "./layout/layout";
import { Route, Router } from "./Routes";
import { Toaster } from "solid-toast";
// Global state
const [route, setRoute] = createSignal<Route>("machines");
@@ -9,13 +10,14 @@ const [route, setRoute] = createSignal<Route>("machines");
export { route, setRoute };
const App: Component = () => {
return (
return [
<Toaster position="top-right" />,
<MachineProvider>
<Layout>
<Router route={route} />
</Layout>
</MachineProvider>
);
</MachineProvider>,
];
};
export default App;