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'
|
import CommentCell from 'src/components/CommentCell'
|
||||||
|
|
||||||
const CommentPage = ({ id }) => {
|
const CommentPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<CommentsLayout>
|
<MainLayout>
|
||||||
<CommentCell id={id} />
|
<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'
|
import CommentsCell from 'src/components/CommentsCell'
|
||||||
|
|
||||||
const CommentsPage = () => {
|
const CommentsPage = () => {
|
||||||
return (
|
return (
|
||||||
<CommentsLayout>
|
<MainLayout>
|
||||||
<CommentsCell />
|
<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'
|
import EditCommentCell from 'src/components/EditCommentCell'
|
||||||
|
|
||||||
const EditCommentPage = ({ id }) => {
|
const EditCommentPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<CommentsLayout>
|
<MainLayout>
|
||||||
<EditCommentCell id={id} />
|
<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'
|
import EditPartCell from 'src/components/EditPartCell'
|
||||||
|
|
||||||
const EditPartPage = ({ id }) => {
|
const EditPartPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<PartsLayout>
|
<MainLayout>
|
||||||
<EditPartCell id={id} />
|
<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'
|
import EditPartReactionCell from 'src/components/EditPartReactionCell'
|
||||||
|
|
||||||
const EditPartReactionPage = ({ id }) => {
|
const EditPartReactionPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<PartReactionsLayout>
|
<MainLayout>
|
||||||
<EditPartReactionCell id={id} />
|
<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'
|
import EditUserCell from 'src/components/EditUserCell'
|
||||||
|
|
||||||
const EditUserPage = ({ id }) => {
|
const EditUserPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<UsersLayout>
|
<MainLayout>
|
||||||
<EditUserCell id={id} />
|
<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'
|
import NewComment from 'src/components/NewComment'
|
||||||
|
|
||||||
const NewCommentPage = () => {
|
const NewCommentPage = () => {
|
||||||
return (
|
return (
|
||||||
<CommentsLayout>
|
<MainLayout>
|
||||||
<NewComment />
|
<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'
|
import NewPart from 'src/components/NewPart'
|
||||||
|
|
||||||
const NewPartPage = () => {
|
const NewPartPage = () => {
|
||||||
return (
|
return (
|
||||||
<PartsLayout>
|
<MainLayout>
|
||||||
<NewPart />
|
<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'
|
import NewPartReaction from 'src/components/NewPartReaction'
|
||||||
|
|
||||||
const NewPartReactionPage = () => {
|
const NewPartReactionPage = () => {
|
||||||
return (
|
return (
|
||||||
<PartReactionsLayout>
|
<MainLayout>
|
||||||
<NewPartReaction />
|
<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'
|
import NewUser from 'src/components/NewUser'
|
||||||
|
|
||||||
const NewUserPage = () => {
|
const NewUserPage = () => {
|
||||||
return (
|
return (
|
||||||
<UsersLayout>
|
<MainLayout>
|
||||||
<NewUser />
|
<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'
|
import PartCell from 'src/components/PartCell'
|
||||||
|
|
||||||
const PartPage = ({ id }) => {
|
const PartPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<PartsLayout>
|
<MainLayout>
|
||||||
<PartCell id={id} />
|
<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'
|
import PartReactionCell from 'src/components/PartReactionCell'
|
||||||
|
|
||||||
const PartReactionPage = ({ id }) => {
|
const PartReactionPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<PartReactionsLayout>
|
<MainLayout>
|
||||||
<PartReactionCell id={id} />
|
<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'
|
import PartReactionsCell from 'src/components/PartReactionsCell'
|
||||||
|
|
||||||
const PartReactionsPage = () => {
|
const PartReactionsPage = () => {
|
||||||
return (
|
return (
|
||||||
<PartReactionsLayout>
|
<MainLayout>
|
||||||
<PartReactionsCell />
|
<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'
|
import PartsCell from 'src/components/PartsCell'
|
||||||
|
|
||||||
const PartsPage = () => {
|
const PartsPage = () => {
|
||||||
return (
|
return (
|
||||||
<PartsLayout>
|
<MainLayout>
|
||||||
<PartsCell />
|
<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'
|
import UserCell from 'src/components/UserCell'
|
||||||
|
|
||||||
const UserPage = ({ id }) => {
|
const UserPage = ({ id }) => {
|
||||||
return (
|
return (
|
||||||
<UsersLayout>
|
<MainLayout>
|
||||||
<UserCell id={id} />
|
<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'
|
import UsersCell from 'src/components/UsersCell'
|
||||||
|
|
||||||
const UsersPage = () => {
|
const UsersPage = () => {
|
||||||
return (
|
return (
|
||||||
<UsersLayout>
|
<MainLayout>
|
||||||
<UsersCell />
|
<UsersCell />
|
||||||
</UsersLayout>
|
</MainLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user