chapter 2
This commit is contained in:
@@ -7,12 +7,24 @@
|
||||
// 'src/pages/HomePage/HomePage.js' -> HomePage
|
||||
// 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage
|
||||
|
||||
import { Router, Route } from '@redwoodjs/router'
|
||||
import { Router, Route, Set } from '@redwoodjs/router'
|
||||
import PostsLayout from 'src/layouts/PostsLayout'
|
||||
import BlogLayout from './layouts/BlogLayout/BlogLayout'
|
||||
|
||||
const Routes = () => {
|
||||
return (
|
||||
<Router>
|
||||
<Route notfound page={NotFoundPage} />
|
||||
<Set wrap={PostsLayout}>
|
||||
<Route path="/posts/new" page={PostNewPostPage} name="newPost" />
|
||||
<Route path="/posts/{id:Int}/edit" page={PostEditPostPage} name="editPost" />
|
||||
<Route path="/posts/{id:Int}" page={PostPostPage} name="post" />
|
||||
<Route path="/posts" page={PostPostsPage} name="posts" />
|
||||
</Set>
|
||||
<Set wrap={BlogLayout}>
|
||||
<Route path="/about" page={AboutPage} name="about" />
|
||||
<Route path="/" page={HomePage} name="home" />
|
||||
</Set>
|
||||
<Route notfound page={NotFoundPage} />
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user