Rename BlogPostPage -> ArticlePage

This commit is contained in:
Rob Cameron
2022-02-08 14:49:01 -08:00
parent 9ca3046cc4
commit ab61793bcf
6 changed files with 23 additions and 19 deletions

View File

@@ -26,6 +26,12 @@ const Routes = () => {
<Route path="/admin/posts" page={PostPostsPage} name="posts" /> <Route path="/admin/posts" page={PostPostsPage} name="posts" />
</Set> </Set>
</Private> </Private>
<Set wrap={BlogLayout}>
<Route path="/contact" page={ContactPage} name="contact" />
<Route path="/article/{id:Int}" page={ArticlePage} name="article" />
<Route path="/about" page={AboutPage} name="about" />
<Route path="/" page={HomePage} name="home" />
</Set>
<Route notfound page={NotFoundPage} /> <Route notfound page={NotFoundPage} />
</Router> </Router>
) )

View File

@@ -0,0 +1,7 @@
import BlogPostCell from 'src/components/BlogPostCell'
const ArticlePage = ({ id }) => {
return <BlogPostCell id={id} />
}
export default ArticlePage

View File

@@ -0,0 +1,7 @@
import ArticlePage from './ArticlePage'
export const generated = () => {
return <ArticlePage />
}
export default { title: 'Pages/ArticlePage' }

View File

@@ -1,11 +1,11 @@
import { render } from '@redwoodjs/testing' import { render } from '@redwoodjs/testing'
import BlogPostPage from './BlogPostPage' import ArticlePage from './ArticlePage'
describe('BlogPostPage', () => { describe('ArticlePage', () => {
it('renders successfully', () => { it('renders successfully', () => {
expect(() => { expect(() => {
render(<BlogPostPage />) render(<ArticlePage />)
}).not.toThrow() }).not.toThrow()
}) })
}) })

View File

@@ -1,9 +0,0 @@
import BlogPostCell from 'src/components/BlogPostCell'
const BlogPostPage = ({ id }) => {
return (
<BlogPostCell id={id} />
)
}
export default BlogPostPage

View File

@@ -1,7 +0,0 @@
import BlogPostPage from './BlogPostPage'
export const generated = () => {
return <BlogPostPage />
}
export default { title: 'Pages/BlogPostPage' }