update: app and main

This commit is contained in:
2026-04-28 13:32:54 +02:00
parent 0f83f57e23
commit aa7db176e6
2 changed files with 9 additions and 4 deletions
-3
View File
@@ -1,13 +1,10 @@
import { StrictMode } from "react"; import { StrictMode } from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import App from "./App"; import App from "./App";
import "./index.css"; import "./index.css";
createRoot(document.getElementById("root")!).render( createRoot(document.getElementById("root")!).render(
<StrictMode> <StrictMode>
<BrowserRouter>
<App /> <App />
</BrowserRouter>
</StrictMode>, </StrictMode>,
); );
+8
View File
@@ -5,6 +5,7 @@ import {
createRouter, createRouter,
} from "@tanstack/react-router"; } from "@tanstack/react-router";
import { HomePage } from "@/pages/HomePage"; import { HomePage } from "@/pages/HomePage";
import { EditorPage } from "@/pages/editor/EditorPage";
import { import {
DocsArchitectureRoute, DocsArchitectureRoute,
DocsFeaturesRoute, DocsFeaturesRoute,
@@ -23,6 +24,12 @@ const indexRoute = createRoute({
component: HomePage, component: HomePage,
}); });
const editorRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/editor",
component: EditorPage,
});
const docsRoute = createRoute({ const docsRoute = createRoute({
getParentRoute: () => rootRoute, getParentRoute: () => rootRoute,
path: "/docs", path: "/docs",
@@ -55,6 +62,7 @@ const docsFeaturesRoute = createRoute({
const routeTree = rootRoute.addChildren([ const routeTree = rootRoute.addChildren([
indexRoute, indexRoute,
editorRoute,
docsRoute.addChildren([ docsRoute.addChildren([
docsIndexRoute, docsIndexRoute,
docsArchitectureRoute, docsArchitectureRoute,