mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-12 17:28:56 +01:00
basic routing
This commit is contained in:
parent
0e5b01f897
commit
b8823ade29
30
ui/frontend/build_src/src/App.tsx
Normal file
30
ui/frontend/build_src/src/App.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
import {
|
||||
Link,
|
||||
MakeGenerics,
|
||||
Outlet,
|
||||
ReactLocation,
|
||||
Router,
|
||||
useMatch,
|
||||
} from "@tanstack/react-location";
|
||||
|
||||
|
||||
import Home from "./components/layouts/Home";
|
||||
import Settings from "./components/layouts/Settings";
|
||||
|
||||
const location = new ReactLocation();
|
||||
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<Router
|
||||
location={location}
|
||||
routes={[
|
||||
{path: "/", element: <Home />},
|
||||
{path: "settings", element: <Settings />},
|
||||
]}
|
||||
>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
@ -6,19 +6,19 @@ import {
|
||||
CreateLayout,
|
||||
DisplayLayout,
|
||||
FooterLayout, // @ts-ignore
|
||||
} from "./app.css.ts";
|
||||
} from "./home.css.ts";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getSaveDirectory } from "../../api";
|
||||
import { useImageCreate } from "../../store/imageCreateStore";
|
||||
import { getSaveDirectory } from "../../../api";
|
||||
import { useImageCreate } from "../../../store/imageCreateStore";
|
||||
|
||||
// Todo - import components here
|
||||
import HeaderDisplay from "../organisms/headerDisplay";
|
||||
import CreationPanel from "../organisms/creationPanel";
|
||||
import DisplayPanel from "../organisms/displayPanel";
|
||||
import FooterDisplay from "../organisms/footerDisplay";
|
||||
import HeaderDisplay from "../../organisms/headerDisplay";
|
||||
import CreationPanel from "../../organisms/creationPanel";
|
||||
import DisplayPanel from "../../organisms/displayPanel";
|
||||
import FooterDisplay from "../../organisms/footerDisplay";
|
||||
|
||||
function App() {
|
||||
function Editor() {
|
||||
// Get the original save directory
|
||||
const setRequestOption = useImageCreate((state) => state.setRequestOptions);
|
||||
const { status, data } = useQuery(["SaveDir"], getSaveDirectory);
|
||||
@ -46,4 +46,4 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default Editor;
|
@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
|
||||
export default function Settings() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Settings</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -6,7 +6,10 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
|
||||
import { enableMapSet } from "immer";
|
||||
import App from "./components/layouts/App";
|
||||
import Editor from "./components/layouts/Home";
|
||||
|
||||
import App from "./App";
|
||||
|
||||
|
||||
import "./styles.css.ts";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user