Use a common layout for all pages
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import { Flash } from '@redwoodjs/web'
|
||||
|
||||
const CommentsLayout = (props) => {
|
||||
return (
|
||||
<div className="rw-scaffold">
|
||||
<Flash timeout={1000} />
|
||||
<header className="rw-header">
|
||||
<h1 className="rw-heading rw-heading-primary">
|
||||
<Link to={routes.comments()} className="rw-link">
|
||||
Comments
|
||||
</Link>
|
||||
</h1>
|
||||
<Link to={routes.newComment()} className="rw-button rw-button-green">
|
||||
<div className="rw-button-icon">+</div> New Comment
|
||||
</Link>
|
||||
</header>
|
||||
<main className="rw-main">{props.children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default CommentsLayout
|
||||
@@ -1,26 +0,0 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import { Flash } from '@redwoodjs/web'
|
||||
|
||||
const PartReactionsLayout = (props) => {
|
||||
return (
|
||||
<div className="rw-scaffold">
|
||||
<Flash timeout={1000} />
|
||||
<header className="rw-header">
|
||||
<h1 className="rw-heading rw-heading-primary">
|
||||
<Link to={routes.partReactions()} className="rw-link">
|
||||
PartReactions
|
||||
</Link>
|
||||
</h1>
|
||||
<Link
|
||||
to={routes.newPartReaction()}
|
||||
className="rw-button rw-button-green"
|
||||
>
|
||||
<div className="rw-button-icon">+</div> New PartReaction
|
||||
</Link>
|
||||
</header>
|
||||
<main className="rw-main">{props.children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PartReactionsLayout
|
||||
@@ -1,23 +0,0 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import { Flash } from '@redwoodjs/web'
|
||||
|
||||
const PartsLayout = (props) => {
|
||||
return (
|
||||
<div className="rw-scaffold">
|
||||
<Flash timeout={1000} />
|
||||
<header className="rw-header">
|
||||
<h1 className="rw-heading rw-heading-primary">
|
||||
<Link to={routes.parts()} className="rw-link">
|
||||
Parts
|
||||
</Link>
|
||||
</h1>
|
||||
<Link to={routes.newPart()} className="rw-button rw-button-green">
|
||||
<div className="rw-button-icon">+</div> New Part
|
||||
</Link>
|
||||
</header>
|
||||
<main className="rw-main">{props.children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default PartsLayout
|
||||
@@ -1,23 +0,0 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import { Flash } from '@redwoodjs/web'
|
||||
|
||||
const UsersLayout = (props) => {
|
||||
return (
|
||||
<div className="rw-scaffold">
|
||||
<Flash timeout={1000} />
|
||||
<header className="rw-header">
|
||||
<h1 className="rw-heading rw-heading-primary">
|
||||
<Link to={routes.users()} className="rw-link">
|
||||
Users
|
||||
</Link>
|
||||
</h1>
|
||||
<Link to={routes.newUser()} className="rw-button rw-button-green">
|
||||
<div className="rw-button-icon">+</div> New User
|
||||
</Link>
|
||||
</header>
|
||||
<main className="rw-main">{props.children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default UsersLayout
|
||||
@@ -1,11 +1,11 @@
|
||||
import CommentsLayout from 'src/layouts/CommentsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import CommentCell from 'src/components/CommentCell'
|
||||
|
||||
const CommentPage = ({ id }) => {
|
||||
return (
|
||||
<CommentsLayout>
|
||||
<MainLayout>
|
||||
<CommentCell id={id} />
|
||||
</CommentsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import CommentsLayout from 'src/layouts/CommentsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import CommentsCell from 'src/components/CommentsCell'
|
||||
|
||||
const CommentsPage = () => {
|
||||
return (
|
||||
<CommentsLayout>
|
||||
<MainLayout>
|
||||
<CommentsCell />
|
||||
</CommentsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import CommentsLayout from 'src/layouts/CommentsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import EditCommentCell from 'src/components/EditCommentCell'
|
||||
|
||||
const EditCommentPage = ({ id }) => {
|
||||
return (
|
||||
<CommentsLayout>
|
||||
<MainLayout>
|
||||
<EditCommentCell id={id} />
|
||||
</CommentsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartsLayout from 'src/layouts/PartsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import EditPartCell from 'src/components/EditPartCell'
|
||||
|
||||
const EditPartPage = ({ id }) => {
|
||||
return (
|
||||
<PartsLayout>
|
||||
<MainLayout>
|
||||
<EditPartCell id={id} />
|
||||
</PartsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartReactionsLayout from 'src/layouts/PartReactionsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import EditPartReactionCell from 'src/components/EditPartReactionCell'
|
||||
|
||||
const EditPartReactionPage = ({ id }) => {
|
||||
return (
|
||||
<PartReactionsLayout>
|
||||
<MainLayout>
|
||||
<EditPartReactionCell id={id} />
|
||||
</PartReactionsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import UsersLayout from 'src/layouts/UsersLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import EditUserCell from 'src/components/EditUserCell'
|
||||
|
||||
const EditUserPage = ({ id }) => {
|
||||
return (
|
||||
<UsersLayout>
|
||||
<MainLayout>
|
||||
<EditUserCell id={id} />
|
||||
</UsersLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import CommentsLayout from 'src/layouts/CommentsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import NewComment from 'src/components/NewComment'
|
||||
|
||||
const NewCommentPage = () => {
|
||||
return (
|
||||
<CommentsLayout>
|
||||
<MainLayout>
|
||||
<NewComment />
|
||||
</CommentsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartsLayout from 'src/layouts/PartsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import NewPart from 'src/components/NewPart'
|
||||
|
||||
const NewPartPage = () => {
|
||||
return (
|
||||
<PartsLayout>
|
||||
<MainLayout>
|
||||
<NewPart />
|
||||
</PartsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartReactionsLayout from 'src/layouts/PartReactionsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import NewPartReaction from 'src/components/NewPartReaction'
|
||||
|
||||
const NewPartReactionPage = () => {
|
||||
return (
|
||||
<PartReactionsLayout>
|
||||
<MainLayout>
|
||||
<NewPartReaction />
|
||||
</PartReactionsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import UsersLayout from 'src/layouts/UsersLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import NewUser from 'src/components/NewUser'
|
||||
|
||||
const NewUserPage = () => {
|
||||
return (
|
||||
<UsersLayout>
|
||||
<MainLayout>
|
||||
<NewUser />
|
||||
</UsersLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartsLayout from 'src/layouts/PartsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import PartCell from 'src/components/PartCell'
|
||||
|
||||
const PartPage = ({ id }) => {
|
||||
return (
|
||||
<PartsLayout>
|
||||
<MainLayout>
|
||||
<PartCell id={id} />
|
||||
</PartsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartReactionsLayout from 'src/layouts/PartReactionsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import PartReactionCell from 'src/components/PartReactionCell'
|
||||
|
||||
const PartReactionPage = ({ id }) => {
|
||||
return (
|
||||
<PartReactionsLayout>
|
||||
<MainLayout>
|
||||
<PartReactionCell id={id} />
|
||||
</PartReactionsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartReactionsLayout from 'src/layouts/PartReactionsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import PartReactionsCell from 'src/components/PartReactionsCell'
|
||||
|
||||
const PartReactionsPage = () => {
|
||||
return (
|
||||
<PartReactionsLayout>
|
||||
<MainLayout>
|
||||
<PartReactionsCell />
|
||||
</PartReactionsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import PartsLayout from 'src/layouts/PartsLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import PartsCell from 'src/components/PartsCell'
|
||||
|
||||
const PartsPage = () => {
|
||||
return (
|
||||
<PartsLayout>
|
||||
<MainLayout>
|
||||
<PartsCell />
|
||||
</PartsLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import UsersLayout from 'src/layouts/UsersLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import UserCell from 'src/components/UserCell'
|
||||
|
||||
const UserPage = ({ id }) => {
|
||||
return (
|
||||
<UsersLayout>
|
||||
<MainLayout>
|
||||
<UserCell id={id} />
|
||||
</UsersLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import UsersLayout from 'src/layouts/UsersLayout'
|
||||
import MainLayout from 'src/layouts/MainLayout'
|
||||
import UsersCell from 'src/components/UsersCell'
|
||||
|
||||
const UsersPage = () => {
|
||||
return (
|
||||
<UsersLayout>
|
||||
<MainLayout>
|
||||
<UsersCell />
|
||||
</UsersLayout>
|
||||
</MainLayout>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user