mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-29 12:07:38 +03:00
Fixed problem with article editor routing.
This commit is contained in:
parent
d0044dd320
commit
8ffc7ebdae
@ -25,6 +25,8 @@ const ArticleEditorPage = (props) => {
|
|||||||
return <span> Please <Link to='/login'>log in</Link>. </span>
|
return <span> Please <Link to='/login'>log in</Link>. </span>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('here', article)
|
||||||
|
|
||||||
return articleError
|
return articleError
|
||||||
? articleError.message || articleError
|
? articleError.message || articleError
|
||||||
: (
|
: (
|
||||||
@ -39,6 +41,8 @@ const ArticleEditor = (props) => {
|
|||||||
const user = props.user
|
const user = props.user
|
||||||
const article = props.article
|
const article = props.article
|
||||||
|
|
||||||
|
console.log(article)
|
||||||
|
|
||||||
const history = useHistory()
|
const history = useHistory()
|
||||||
|
|
||||||
const [title, setTitle] = useState(article?.title || '')
|
const [title, setTitle] = useState(article?.title || '')
|
||||||
|
@ -27,7 +27,7 @@ page UserProfile {
|
|||||||
component: import UserProfile from "@ext/UserProfilePage.js"
|
component: import UserProfile from "@ext/UserProfilePage.js"
|
||||||
}
|
}
|
||||||
|
|
||||||
route "/editor/:articleId" -> page ArticleEditor
|
route "/editor/:articleId?" -> page ArticleEditor
|
||||||
page ArticleEditor {
|
page ArticleEditor {
|
||||||
component: import ArticleEditor from "@ext/ArticleEditorPage.js"
|
component: import ArticleEditor from "@ext/ArticleEditorPage.js"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user