bunch of stuff

This commit is contained in:
Kurt Hutten
2020-10-10 11:26:25 +11:00
parent 5f8cccf336
commit 029d6f4efc
36 changed files with 1277 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
import { Link, routes } from '@redwoodjs/router'
import BlogLayout from 'src/layouts/BlogLayout'
const AboutPage = () => {
return (
<BlogLayout>
<h1>AboutPage</h1>
<p>
Find me in <tt>./web/src/pages/AboutPage/AboutPage.js</tt>
</p>
<p>
My default route is named <tt>about</tt>, link to me with `
<Link to={routes.about()}>About</Link>`
</p>
</BlogLayout>
)
}
export default AboutPage

View File

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

View File

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

View File

@@ -0,0 +1,12 @@
import PostsLayout from 'src/layouts/PostsLayout'
import EditPostCell from 'src/components/EditPostCell'
const EditPostPage = ({ id }) => {
return (
<PostsLayout>
<EditPostCell id={id} />
</PostsLayout>
)
}
export default EditPostPage

View File

@@ -0,0 +1,13 @@
import BlogLayout from 'src/layouts/BlogLayout'
import BlogPostsCell from 'src/components/BlogPostsCell'
const HomePage = () => {
return (
<BlogLayout>
<BlogPostsCell/>
</BlogLayout>
)
}
export default HomePage

View File

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

View File

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

View File

@@ -0,0 +1,12 @@
import PostsLayout from 'src/layouts/PostsLayout'
import NewPost from 'src/components/NewPost'
const NewPostPage = () => {
return (
<PostsLayout>
<NewPost />
</PostsLayout>
)
}
export default NewPostPage

View File

@@ -0,0 +1,12 @@
import PostsLayout from 'src/layouts/PostsLayout'
import PostCell from 'src/components/PostCell'
const PostPage = ({ id }) => {
return (
<PostsLayout>
<PostCell id={id} />
</PostsLayout>
)
}
export default PostPage

View File

@@ -0,0 +1,12 @@
import PostsLayout from 'src/layouts/PostsLayout'
import PostsCell from 'src/components/PostsCell'
const PostsPage = () => {
return (
<PostsLayout>
<PostsCell />
</PostsLayout>
)
}
export default PostsPage