fix: home md not shown

This commit is contained in:
h z
2024-12-10 13:25:17 +00:00
parent d88fb34881
commit 76b64716c2
3 changed files with 50 additions and 7 deletions

View File

@@ -13,7 +13,6 @@ import {useHomeMarkdown} from "./utils/markdown-queries";
const App = () => {
const {home, isLoading, error} = useHomeMarkdown();
return (
<Router>
<div className="app-container">
@@ -24,12 +23,9 @@ const App = () => {
<Routes>
<Route
path="/"
element={
(home && home.id)
? <Navigate to = {`/markdown/${home.id}`}/>
: <p>HOME</p>
}
element={<Navigate to = "/markdown/1"/>}
/>
<Route path="/testx" element={<h2>test2</h2>}/>
<Route path="/markdown/:id" element={<MarkdownContent />} />
<Route path="/callback" element={<Callback />} />
<Route path="/test" element={<h1>TEST</h1>}></Route>