update: app and main
This commit is contained in:
+1
-4
@@ -1,13 +1,10 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import App from "./App";
|
||||
import "./index.css";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<BrowserRouter>
|
||||
<App />
|
||||
</BrowserRouter>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
createRouter,
|
||||
} from "@tanstack/react-router";
|
||||
import { HomePage } from "@/pages/HomePage";
|
||||
import { EditorPage } from "@/pages/editor/EditorPage";
|
||||
import {
|
||||
DocsArchitectureRoute,
|
||||
DocsFeaturesRoute,
|
||||
@@ -23,6 +24,12 @@ const indexRoute = createRoute({
|
||||
component: HomePage,
|
||||
});
|
||||
|
||||
const editorRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/editor",
|
||||
component: EditorPage,
|
||||
});
|
||||
|
||||
const docsRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/docs",
|
||||
@@ -55,6 +62,7 @@ const docsFeaturesRoute = createRoute({
|
||||
|
||||
const routeTree = rootRoute.addChildren([
|
||||
indexRoute,
|
||||
editorRoute,
|
||||
docsRoute.addChildren([
|
||||
docsIndexRoute,
|
||||
docsArchitectureRoute,
|
||||
|
||||
Reference in New Issue
Block a user