34 lines
768 B
TypeScript
34 lines
768 B
TypeScript
import React from "react";
|
|
import {createRoot} from "react-dom/client";
|
|
import {DemoApp} from "./DemoApp";
|
|
import {createBrowserRouter} from "react-router-dom";
|
|
import {Kernel} from "../src/Application/Kernel";
|
|
import {NavTest} from "./NavTest";
|
|
import {Avocado} from "@phosphor-icons/react";
|
|
|
|
// Router initialization.
|
|
const router = createBrowserRouter([
|
|
{
|
|
path: "/",
|
|
element: <DemoApp />,
|
|
children: [
|
|
{
|
|
path: "test",
|
|
element: <NavTest />,
|
|
}
|
|
],
|
|
}
|
|
])
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
const demoApp = document.getElementById("demo-app");
|
|
|
|
const root = createRoot(demoApp);
|
|
|
|
root.render(<Kernel router={router} footer={
|
|
<footer>
|
|
<Avocado weight={"duotone"} size={32} />
|
|
<div>Kernel</div>
|
|
</footer>
|
|
} />);
|
|
});
|