fix: home md not shown
This commit is contained in:
@@ -13,7 +13,6 @@ import {useHomeMarkdown} from "./utils/markdown-queries";
|
|||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
|
||||||
const {home, isLoading, error} = useHomeMarkdown();
|
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<div className="app-container">
|
<div className="app-container">
|
||||||
@@ -24,12 +23,9 @@ const App = () => {
|
|||||||
<Routes>
|
<Routes>
|
||||||
<Route
|
<Route
|
||||||
path="/"
|
path="/"
|
||||||
element={
|
element={<Navigate to = "/markdown/1"/>}
|
||||||
(home && home.id)
|
|
||||||
? <Navigate to = {`/markdown/${home.id}`}/>
|
|
||||||
: <p>HOME</p>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
|
<Route path="/testx" element={<h2>test2</h2>}/>
|
||||||
<Route path="/markdown/:id" element={<MarkdownContent />} />
|
<Route path="/markdown/:id" element={<MarkdownContent />} />
|
||||||
<Route path="/callback" element={<Callback />} />
|
<Route path="/callback" element={<Callback />} />
|
||||||
<Route path="/test" element={<h1>TEST</h1>}></Route>
|
<Route path="/test" element={<h1>TEST</h1>}></Route>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const Footer = () => {
|
|||||||
<a href="https://git.hangman-lab.top/hzhang/HangmanLab">git</a>
|
<a href="https://git.hangman-lab.top/hzhang/HangmanLab">git</a>
|
||||||
|
|
||||||
|
|
||||||
|
v0.0.6
|
||||||
</span>
|
</span>
|
||||||
)}</p>
|
)}</p>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,4 +46,50 @@ pre {
|
|||||||
|
|
||||||
.markdown-preview li {
|
.markdown-preview li {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown-preview h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview h2 {
|
||||||
|
|
||||||
|
font-size: 1.75em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview h3 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.markdown-preview h4 {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-preview h5 {
|
||||||
|
font-size: 1.1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.markdown-preview h6 {
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user