Allow for new parts to be created
This commit is contained in:
20
web/src/pages/NewPart2Page/NewPart2Page.js
Normal file
20
web/src/pages/NewPart2Page/NewPart2Page.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useAuth } from '@redwoodjs/auth'
|
||||
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import Part2Cell from 'src/components/Part2Cell'
|
||||
|
||||
|
||||
const NewPart2Page = ({userName}) => {
|
||||
const { currentUser } = useAuth()
|
||||
return (
|
||||
<MainLayout>
|
||||
<Part2Cell
|
||||
userName={userName}
|
||||
currentUserId={currentUser?.sub}
|
||||
isEditable
|
||||
/>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
export default NewPart2Page
|
||||
7
web/src/pages/NewPart2Page/NewPart2Page.stories.js
Normal file
7
web/src/pages/NewPart2Page/NewPart2Page.stories.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import NewPart2Page from './NewPart2Page'
|
||||
|
||||
export const generated = () => {
|
||||
return <NewPart2Page />
|
||||
}
|
||||
|
||||
export default { title: 'Pages/NewPart2Page' }
|
||||
11
web/src/pages/NewPart2Page/NewPart2Page.test.js
Normal file
11
web/src/pages/NewPart2Page/NewPart2Page.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { render } from '@redwoodjs/testing'
|
||||
|
||||
import NewPart2Page from './NewPart2Page'
|
||||
|
||||
describe('NewPart2Page', () => {
|
||||
it('renders successfully', () => {
|
||||
expect(() => {
|
||||
render(<NewPart2Page />)
|
||||
}).not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user