Skip to content

Commit

Permalink
yarn rw generate page Home /
Browse files Browse the repository at this point in the history
  • Loading branch information
zainfathoni committed Jun 17, 2020
1 parent 80190a2 commit b85c9f4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/src/Routes.js
Expand Up @@ -12,6 +12,7 @@ import { Router, Route } from '@redwoodjs/router'
const Routes = () => {
return (
<Router>
<Route path="/" page={HomePage} name="home" />
<Route notfound page={NotFoundPage} />
</Router>
)
Expand Down
10 changes: 10 additions & 0 deletions web/src/pages/HomePage/HomePage.js
@@ -0,0 +1,10 @@
const HomePage = () => {
return (
<div>
<h1>HomePage</h1>
<p>Find me in ./web/src/pages/HomePage/HomePage.js</p>
</div>
)
}

export default HomePage
14 changes: 14 additions & 0 deletions web/src/pages/HomePage/HomePage.test.js
@@ -0,0 +1,14 @@
import { render, cleanup } from '@redwoodjs/testing'

import HomePage from './HomePage'

describe('HomePage', () => {
afterEach(() => {
cleanup()
})
it('renders successfully', () => {
expect(() => {
render(<HomePage />)
}).not.toThrow()
})
})

0 comments on commit b85c9f4

Please sign in to comment.