23
web/src/pages/EditPartPage/EditPartPage.js
Normal file
23
web/src/pages/EditPartPage/EditPartPage.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { useAuth } from '@redwoodjs/auth'
|
||||
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import PartCell from 'src/components/PartCell'
|
||||
import Seo from 'src/components/Seo/Seo'
|
||||
|
||||
const EditPartPage = ({ userName, partTitle }) => {
|
||||
const { currentUser } = useAuth()
|
||||
return (
|
||||
<MainLayout>
|
||||
<Seo title={partTitle} description="Edit part page" lang="en-US" />
|
||||
|
||||
<PartCell
|
||||
userName={userName}
|
||||
partTitle={partTitle}
|
||||
currentUserId={currentUser?.sub}
|
||||
isEditable
|
||||
/>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditPartPage
|
||||
7
web/src/pages/EditPartPage/EditPartPage.stories.js
Normal file
7
web/src/pages/EditPartPage/EditPartPage.stories.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import EditPartPage from './EditPartPage'
|
||||
|
||||
export const generated = () => {
|
||||
return <EditPartPage />
|
||||
}
|
||||
|
||||
export default { title: 'Pages/EditPartPage' }
|
||||
11
web/src/pages/EditPartPage/EditPartPage.test.js
Normal file
11
web/src/pages/EditPartPage/EditPartPage.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { render } from '@redwoodjs/testing'
|
||||
|
||||
import EditPartPage from './EditPartPage'
|
||||
|
||||
describe('EditPartPage', () => {
|
||||
it('renders successfully', () => {
|
||||
expect(() => {
|
||||
render(<EditPartPage />)
|
||||
}).not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user