Pre-deployment
This commit is contained in:
26
web/src/layouts/BlogLayout/BlogLayout.js
Normal file
26
web/src/layouts/BlogLayout/BlogLayout.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Link,routes } from '@redwoodjs/router'
|
||||
|
||||
const BlogLayout = ({ children }) => {
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
<h1>
|
||||
<Link to={routes.home()}>Redwood Blog</Link>
|
||||
</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<Link to={routes.about()}>About</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to={routes.contact()}>Contact</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>{children}</main>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default BlogLayout
|
||||
7
web/src/layouts/BlogLayout/BlogLayout.stories.js
Normal file
7
web/src/layouts/BlogLayout/BlogLayout.stories.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import BlogLayout from './BlogLayout'
|
||||
|
||||
export const generated = () => {
|
||||
return <BlogLayout />
|
||||
}
|
||||
|
||||
export default { title: 'Layouts/BlogLayout' }
|
||||
11
web/src/layouts/BlogLayout/BlogLayout.test.js
Normal file
11
web/src/layouts/BlogLayout/BlogLayout.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { render } from '@redwoodjs/testing'
|
||||
|
||||
import BlogLayout from './BlogLayout'
|
||||
|
||||
describe('BlogLayout', () => {
|
||||
it('renders successfully', () => {
|
||||
expect(() => {
|
||||
render(<BlogLayout />)
|
||||
}).not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user