2024-06-08 23:52:26 +02:00
|
|
|
import React from "react";
|
|
|
|
import {createRoot} from "react-dom/client";
|
|
|
|
import {DemoApp} from "./DemoApp";
|
2024-07-07 18:37:34 +02:00
|
|
|
import {createBrowserRouter} from "react-router-dom";
|
|
|
|
import {Kernel} from "../src/Application/Kernel";
|
|
|
|
import {NavTest} from "./NavTest";
|
|
|
|
|
|
|
|
// Router initialization.
|
|
|
|
const router = createBrowserRouter([
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
element: <DemoApp />,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: "test",
|
|
|
|
element: <NavTest />,
|
|
|
|
}
|
|
|
|
],
|
|
|
|
}
|
|
|
|
])
|
2024-06-08 23:52:26 +02:00
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
|
|
const demoApp = document.getElementById("demo-app");
|
|
|
|
|
|
|
|
const root = createRoot(demoApp);
|
|
|
|
|
2024-07-07 18:37:34 +02:00
|
|
|
root.render(<Kernel router={router} footer={
|
|
|
|
<footer>
|
|
|
|
Footer test.
|
|
|
|
</footer>
|
|
|
|
} />);
|
2024-06-08 23:52:26 +02:00
|
|
|
});
|