From faffc0f46d54bd6d398cd4b0a1e9c3a45a5bfae5 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Mon, 2 Nov 2020 07:09:22 +1100 Subject: [PATCH] Use a common layout for all pages --- .../layouts/CommentsLayout/CommentsLayout.js | 23 ---------------- .../PartReactionsLayout.js | 26 ------------------- web/src/layouts/PartsLayout/PartsLayout.js | 23 ---------------- web/src/layouts/UsersLayout/UsersLayout.js | 23 ---------------- web/src/pages/CommentPage/CommentPage.js | 6 ++--- web/src/pages/CommentsPage/CommentsPage.js | 6 ++--- .../pages/EditCommentPage/EditCommentPage.js | 6 ++--- web/src/pages/EditPartPage/EditPartPage.js | 6 ++--- .../EditPartReactionPage.js | 6 ++--- web/src/pages/EditUserPage/EditUserPage.js | 6 ++--- .../pages/NewCommentPage/NewCommentPage.js | 6 ++--- web/src/pages/NewPartPage/NewPartPage.js | 6 ++--- .../NewPartReactionPage.js | 6 ++--- web/src/pages/NewUserPage/NewUserPage.js | 6 ++--- web/src/pages/PartPage/PartPage.js | 6 ++--- .../PartReactionPage/PartReactionPage.js | 6 ++--- .../PartReactionsPage/PartReactionsPage.js | 6 ++--- web/src/pages/PartsPage/PartsPage.js | 6 ++--- web/src/pages/UserPage/UserPage.js | 6 ++--- web/src/pages/UsersPage/UsersPage.js | 6 ++--- 20 files changed, 48 insertions(+), 143 deletions(-) delete mode 100644 web/src/layouts/CommentsLayout/CommentsLayout.js delete mode 100644 web/src/layouts/PartReactionsLayout/PartReactionsLayout.js delete mode 100644 web/src/layouts/PartsLayout/PartsLayout.js delete mode 100644 web/src/layouts/UsersLayout/UsersLayout.js diff --git a/web/src/layouts/CommentsLayout/CommentsLayout.js b/web/src/layouts/CommentsLayout/CommentsLayout.js deleted file mode 100644 index 4ed9e72..0000000 --- a/web/src/layouts/CommentsLayout/CommentsLayout.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import { Flash } from '@redwoodjs/web' - -const CommentsLayout = (props) => { - return ( -
- -
-

- - Comments - -

- -
+
New Comment - -
-
{props.children}
-
- ) -} - -export default CommentsLayout diff --git a/web/src/layouts/PartReactionsLayout/PartReactionsLayout.js b/web/src/layouts/PartReactionsLayout/PartReactionsLayout.js deleted file mode 100644 index 076c5b2..0000000 --- a/web/src/layouts/PartReactionsLayout/PartReactionsLayout.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import { Flash } from '@redwoodjs/web' - -const PartReactionsLayout = (props) => { - return ( -
- -
-

- - PartReactions - -

- -
+
New PartReaction - -
-
{props.children}
-
- ) -} - -export default PartReactionsLayout diff --git a/web/src/layouts/PartsLayout/PartsLayout.js b/web/src/layouts/PartsLayout/PartsLayout.js deleted file mode 100644 index f0ecd0c..0000000 --- a/web/src/layouts/PartsLayout/PartsLayout.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import { Flash } from '@redwoodjs/web' - -const PartsLayout = (props) => { - return ( -
- -
-

- - Parts - -

- -
+
New Part - -
-
{props.children}
-
- ) -} - -export default PartsLayout diff --git a/web/src/layouts/UsersLayout/UsersLayout.js b/web/src/layouts/UsersLayout/UsersLayout.js deleted file mode 100644 index f4f055f..0000000 --- a/web/src/layouts/UsersLayout/UsersLayout.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import { Flash } from '@redwoodjs/web' - -const UsersLayout = (props) => { - return ( -
- -
-

- - Users - -

- -
+
New User - -
-
{props.children}
-
- ) -} - -export default UsersLayout diff --git a/web/src/pages/CommentPage/CommentPage.js b/web/src/pages/CommentPage/CommentPage.js index b4365f8..ea476db 100644 --- a/web/src/pages/CommentPage/CommentPage.js +++ b/web/src/pages/CommentPage/CommentPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/CommentsPage/CommentsPage.js b/web/src/pages/CommentsPage/CommentsPage.js index 37336da..eae6bf3 100644 --- a/web/src/pages/CommentsPage/CommentsPage.js +++ b/web/src/pages/CommentsPage/CommentsPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/EditCommentPage/EditCommentPage.js b/web/src/pages/EditCommentPage/EditCommentPage.js index 159f6af..966739f 100644 --- a/web/src/pages/EditCommentPage/EditCommentPage.js +++ b/web/src/pages/EditCommentPage/EditCommentPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/EditPartPage/EditPartPage.js b/web/src/pages/EditPartPage/EditPartPage.js index 3634709..4d6eb43 100644 --- a/web/src/pages/EditPartPage/EditPartPage.js +++ b/web/src/pages/EditPartPage/EditPartPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/EditPartReactionPage/EditPartReactionPage.js b/web/src/pages/EditPartReactionPage/EditPartReactionPage.js index 1ed29bd..f57b936 100644 --- a/web/src/pages/EditPartReactionPage/EditPartReactionPage.js +++ b/web/src/pages/EditPartReactionPage/EditPartReactionPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/EditUserPage/EditUserPage.js b/web/src/pages/EditUserPage/EditUserPage.js index 4cc6d38..5c8fa8d 100644 --- a/web/src/pages/EditUserPage/EditUserPage.js +++ b/web/src/pages/EditUserPage/EditUserPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/NewCommentPage/NewCommentPage.js b/web/src/pages/NewCommentPage/NewCommentPage.js index d459c05..6526345 100644 --- a/web/src/pages/NewCommentPage/NewCommentPage.js +++ b/web/src/pages/NewCommentPage/NewCommentPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/NewPartPage/NewPartPage.js b/web/src/pages/NewPartPage/NewPartPage.js index 4f39148..c3e7d11 100644 --- a/web/src/pages/NewPartPage/NewPartPage.js +++ b/web/src/pages/NewPartPage/NewPartPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/NewPartReactionPage/NewPartReactionPage.js b/web/src/pages/NewPartReactionPage/NewPartReactionPage.js index 931b1d2..206b815 100644 --- a/web/src/pages/NewPartReactionPage/NewPartReactionPage.js +++ b/web/src/pages/NewPartReactionPage/NewPartReactionPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/NewUserPage/NewUserPage.js b/web/src/pages/NewUserPage/NewUserPage.js index a3818b5..0368b02 100644 --- a/web/src/pages/NewUserPage/NewUserPage.js +++ b/web/src/pages/NewUserPage/NewUserPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/PartPage/PartPage.js b/web/src/pages/PartPage/PartPage.js index e39c2fb..5835dbf 100644 --- a/web/src/pages/PartPage/PartPage.js +++ b/web/src/pages/PartPage/PartPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/PartReactionPage/PartReactionPage.js b/web/src/pages/PartReactionPage/PartReactionPage.js index 9a014ef..849f002 100644 --- a/web/src/pages/PartReactionPage/PartReactionPage.js +++ b/web/src/pages/PartReactionPage/PartReactionPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/PartReactionsPage/PartReactionsPage.js b/web/src/pages/PartReactionsPage/PartReactionsPage.js index f6d927c..1dab5ae 100644 --- a/web/src/pages/PartReactionsPage/PartReactionsPage.js +++ b/web/src/pages/PartReactionsPage/PartReactionsPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/PartsPage/PartsPage.js b/web/src/pages/PartsPage/PartsPage.js index 3d97fa8..b96b998 100644 --- a/web/src/pages/PartsPage/PartsPage.js +++ b/web/src/pages/PartsPage/PartsPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/UserPage/UserPage.js b/web/src/pages/UserPage/UserPage.js index 250b619..cf81dc9 100644 --- a/web/src/pages/UserPage/UserPage.js +++ b/web/src/pages/UserPage/UserPage.js @@ -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 ( - + - + ) } diff --git a/web/src/pages/UsersPage/UsersPage.js b/web/src/pages/UsersPage/UsersPage.js index 8f380ce..7331b05 100644 --- a/web/src/pages/UsersPage/UsersPage.js +++ b/web/src/pages/UsersPage/UsersPage.js @@ -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 ( - + - + ) }