diff --git a/api/src/services/users/users.js b/api/src/services/users/users.js
index 4292baa..7035f5a 100644
--- a/api/src/services/users/users.js
+++ b/api/src/services/users/users.js
@@ -66,7 +66,7 @@ export const deleteUser = ({ id }) => {
export const User = {
Parts: (_obj, { root }) => db.user.findOne({ where: { id: root.id } }).Part(),
- Part: (_obj, { root, ...rest }) =>
+ Part: (_obj, { root }) =>
_obj.partTitle &&
db.part.findOne({
where: {
diff --git a/web/src/Routes.js b/web/src/Routes.js
index d139aae..51aa93e 100644
--- a/web/src/Routes.js
+++ b/web/src/Routes.js
@@ -37,31 +37,17 @@ const Routes = () => {
{/* Ownership enforced routes */}
-
-
+
+
+
+
{/* End ownership enforced routes */}
- {/* GENERATED ROUTES BELOW, probably going to clean these up and delete most of them, but the CRUD functionality is useful for now */}
- {/* All private by default for safety and because the routes that are left after clean up will probably be admin pages */}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/web/src/components/Comment/Comment.js b/web/src/components/Comment/Comment.js
deleted file mode 100644
index 4d928d2..0000000
--- a/web/src/components/Comment/Comment.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes, navigate } from '@redwoodjs/router'
-
-const DELETE_COMMENT_MUTATION = gql`
- mutation DeleteCommentMutation($id: String!) {
- deleteComment(id: $id) {
- id
- }
- }
-`
-
-const jsonDisplay = (obj) => {
- return (
-
- {JSON.stringify(obj, null, 2)}
-
- )
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const Comment = ({ comment }) => {
- const { addMessage } = useFlash()
- const [deleteComment] = useMutation(DELETE_COMMENT_MUTATION, {
- onCompleted: () => {
- navigate(routes.comments())
- addMessage('Comment deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete comment ' + id + '?')) {
- deleteComment({ variables: { id } })
- }
- }
-
- return (
- <>
-
-
-
- Comment {comment.id} Detail
-
-
-
-
-
- | Id |
- {comment.id} |
-
-
- | Text |
- {comment.text} |
-
-
- | User id |
- {comment.userId} |
-
-
- | Part id |
- {comment.partId} |
-
-
- | Created at |
- {timeTag(comment.createdAt)} |
-
-
- | Updated at |
- {timeTag(comment.updatedAt)} |
-
-
-
-
-
- >
- )
-}
-
-export default Comment
diff --git a/web/src/components/CommentCell/CommentCell.js b/web/src/components/CommentCell/CommentCell.js
deleted file mode 100644
index 1c93fe8..0000000
--- a/web/src/components/CommentCell/CommentCell.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import Comment from 'src/components/Comment'
-
-export const QUERY = gql`
- query FIND_COMMENT_BY_ID($id: String!) {
- comment: comment(id: $id) {
- id
- text
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Empty = () => Comment not found
-
-export const Success = ({ comment }) => {
- return
-}
diff --git a/web/src/components/CommentForm/CommentForm.js b/web/src/components/CommentForm/CommentForm.js
deleted file mode 100644
index e145dc5..0000000
--- a/web/src/components/CommentForm/CommentForm.js
+++ /dev/null
@@ -1,83 +0,0 @@
-import {
- Form,
- FormError,
- FieldError,
- Label,
- TextField,
- Submit,
-} from '@redwoodjs/forms'
-
-const CommentForm = (props) => {
- const onSubmit = (data) => {
- props.onSave(data, props?.comment?.id)
- }
-
- return (
-
- )
-}
-
-export default CommentForm
diff --git a/web/src/components/Comments/Comments.js b/web/src/components/Comments/Comments.js
deleted file mode 100644
index f105938..0000000
--- a/web/src/components/Comments/Comments.js
+++ /dev/null
@@ -1,109 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes } from '@redwoodjs/router'
-
-const DELETE_COMMENT_MUTATION = gql`
- mutation DeleteCommentMutation($id: String!) {
- deleteComment(id: $id) {
- id
- }
- }
-`
-
-const MAX_STRING_LENGTH = 150
-
-const truncate = (text) => {
- let output = text
- if (text && text.length > MAX_STRING_LENGTH) {
- output = output.substring(0, MAX_STRING_LENGTH) + '...'
- }
- return output
-}
-
-const jsonTruncate = (obj) => {
- return truncate(JSON.stringify(obj, null, 2))
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const CommentsList = ({ comments }) => {
- const { addMessage } = useFlash()
- const [deleteComment] = useMutation(DELETE_COMMENT_MUTATION, {
- onCompleted: () => {
- addMessage('Comment deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete comment ' + id + '?')) {
- deleteComment({ variables: { id }, refetchQueries: ['COMMENTS'] })
- }
- }
-
- return (
-
-
-
-
- | Id |
- Text |
- User id |
- Part id |
- Created at |
- Updated at |
- |
-
-
-
- {comments.map((comment) => (
-
- | {truncate(comment.id)} |
- {truncate(comment.text)} |
- {truncate(comment.userId)} |
- {truncate(comment.partId)} |
- {timeTag(comment.createdAt)} |
- {timeTag(comment.updatedAt)} |
-
-
- |
-
- ))}
-
-
-
- )
-}
-
-export default CommentsList
diff --git a/web/src/components/CommentsCell/CommentsCell.js b/web/src/components/CommentsCell/CommentsCell.js
deleted file mode 100644
index eefd988..0000000
--- a/web/src/components/CommentsCell/CommentsCell.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Link, routes } from '@redwoodjs/router'
-
-import Comments from 'src/components/Comments'
-
-export const QUERY = gql`
- query COMMENTS {
- comments {
- id
- text
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Empty = () => {
- return (
-
- {'No comments yet. '}
-
- {'Create one?'}
-
-
- )
-}
-
-export const Success = ({ comments }) => {
- return
-}
diff --git a/web/src/components/EditCommentCell/EditCommentCell.js b/web/src/components/EditCommentCell/EditCommentCell.js
deleted file mode 100644
index 3edac98..0000000
--- a/web/src/components/EditCommentCell/EditCommentCell.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import CommentForm from 'src/components/CommentForm'
-
-export const QUERY = gql`
- query FIND_COMMENT_BY_ID($id: String!) {
- comment: comment(id: $id) {
- id
- text
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-const UPDATE_COMMENT_MUTATION = gql`
- mutation UpdateCommentMutation($id: String!, $input: UpdateCommentInput!) {
- updateComment(id: $id, input: $input) {
- id
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Success = ({ comment }) => {
- const { addMessage } = useFlash()
- const [updateComment, { loading, error }] = useMutation(
- UPDATE_COMMENT_MUTATION,
- {
- onCompleted: () => {
- navigate(routes.comments())
- addMessage('Comment updated.', { classes: 'rw-flash-success' })
- },
- }
- )
-
- const onSave = (input, id) => {
- updateComment({ variables: { id, input } })
- }
-
- return (
-
-
-
- Edit Comment {comment.id}
-
-
-
-
-
-
- )
-}
diff --git a/web/src/components/EditPartCell/EditPartCell.js b/web/src/components/EditPartCell/EditPartCell.js
deleted file mode 100644
index 8b551ac..0000000
--- a/web/src/components/EditPartCell/EditPartCell.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import PartForm from 'src/components/PartForm'
-
-export const QUERY = gql`
- query FIND_PART_BY_ID($id: String!) {
- part: part(id: $id) {
- id
- title
- description
- code
- mainImage
- createdAt
- updatedAt
- userId
- }
- }
-`
-const UPDATE_PART_MUTATION = gql`
- mutation UpdatePartMutation($id: String!, $input: UpdatePartInput!) {
- updatePart(id: $id, input: $input) {
- id
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Success = ({ part }) => {
- const { addMessage } = useFlash()
- const [updatePart, { loading, error }] = useMutation(UPDATE_PART_MUTATION, {
- onCompleted: () => {
- navigate(routes.parts())
- addMessage('Part updated.', { classes: 'rw-flash-success' })
- },
- })
-
- const onSave = (input, id) => {
- updatePart({ variables: { id, input } })
- }
-
- return (
-
- )
-}
diff --git a/web/src/components/EditPartReactionCell/EditPartReactionCell.js b/web/src/components/EditPartReactionCell/EditPartReactionCell.js
deleted file mode 100644
index 2c23c50..0000000
--- a/web/src/components/EditPartReactionCell/EditPartReactionCell.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import PartReactionForm from 'src/components/PartReactionForm'
-
-export const QUERY = gql`
- query FIND_PART_REACTION_BY_ID($id: String!) {
- partReaction: partReaction(id: $id) {
- id
- emote
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-const UPDATE_PART_REACTION_MUTATION = gql`
- mutation UpdatePartReactionMutation(
- $id: String!
- $input: UpdatePartReactionInput!
- ) {
- updatePartReaction(id: $id, input: $input) {
- id
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Success = ({ partReaction }) => {
- const { addMessage } = useFlash()
- const [updatePartReaction, { loading, error }] = useMutation(
- UPDATE_PART_REACTION_MUTATION,
- {
- onCompleted: () => {
- navigate(routes.partReactions())
- addMessage('PartReaction updated.', { classes: 'rw-flash-success' })
- },
- }
- )
-
- const onSave = (input, id) => {
- updatePartReaction({ variables: { id, input } })
- }
-
- return (
-
-
-
- Edit PartReaction {partReaction.id}
-
-
-
-
- )
-}
diff --git a/web/src/components/EditUserCell/EditUserCell.js b/web/src/components/EditUserCell/EditUserCell.js
deleted file mode 100644
index 7d3682b..0000000
--- a/web/src/components/EditUserCell/EditUserCell.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import UserForm from 'src/components/UserForm'
-
-export const QUERY = gql`
- query FIND_USER_BY_ID($id: String!) {
- user: user(id: $id) {
- id
- userName
- email
- createdAt
- updatedAt
- image
- bio
- }
- }
-`
-const UPDATE_USER_MUTATION = gql`
- mutation UpdateUserMutation($id: String!, $input: UpdateUserInput!) {
- updateUser(id: $id, input: $input) {
- id
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Success = ({ user }) => {
- const { addMessage } = useFlash()
- const [updateUser, { loading, error }] = useMutation(UPDATE_USER_MUTATION, {
- onCompleted: () => {
- navigate(routes.users())
- addMessage('User updated.', { classes: 'rw-flash-success' })
- },
- })
-
- const onSave = (input, id) => {
- updateUser({ variables: { id, input } })
- }
-
- return (
-
- )
-}
diff --git a/web/src/components/NewComment/NewComment.js b/web/src/components/NewComment/NewComment.js
deleted file mode 100644
index 750bba4..0000000
--- a/web/src/components/NewComment/NewComment.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import CommentForm from 'src/components/CommentForm'
-
-const CREATE_COMMENT_MUTATION = gql`
- mutation CreateCommentMutation($input: CreateCommentInput!) {
- createComment(input: $input) {
- id
- }
- }
-`
-
-const NewComment = () => {
- const { addMessage } = useFlash()
- const [createComment, { loading, error }] = useMutation(
- CREATE_COMMENT_MUTATION,
- {
- onCompleted: () => {
- navigate(routes.comments())
- addMessage('Comment created.', { classes: 'rw-flash-success' })
- },
- }
- )
-
- const onSave = (input) => {
- createComment({ variables: { input } })
- }
-
- return (
-
- )
-}
-
-export default NewComment
diff --git a/web/src/components/NewPart/NewPart.js b/web/src/components/NewPart/NewPart.js
deleted file mode 100644
index 3b7e5ed..0000000
--- a/web/src/components/NewPart/NewPart.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import PartForm from 'src/components/PartForm'
-
-const CREATE_PART_MUTATION = gql`
- mutation CreatePartMutation($input: CreatePartInput!) {
- createPart(input: $input) {
- id
- }
- }
-`
-
-const NewPart = () => {
- const { addMessage } = useFlash()
- const [createPart, { loading, error }] = useMutation(CREATE_PART_MUTATION, {
- onCompleted: () => {
- navigate(routes.parts())
- addMessage('Part created.', { classes: 'rw-flash-success' })
- },
- })
-
- const onSave = (input) => {
- createPart({ variables: { input } })
- }
-
- return (
-
- )
-}
-
-export default NewPart
diff --git a/web/src/components/NewPartReaction/NewPartReaction.js b/web/src/components/NewPartReaction/NewPartReaction.js
deleted file mode 100644
index 07457d2..0000000
--- a/web/src/components/NewPartReaction/NewPartReaction.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import PartReactionForm from 'src/components/PartReactionForm'
-
-const CREATE_PART_REACTION_MUTATION = gql`
- mutation TogglePartReactionMutation($input: TogglePartReactionInput!) {
- togglePartReaction(input: $input) {
- id
- }
- }
-`
-
-const NewPartReaction = () => {
- const { addMessage } = useFlash()
- const [togglePartReaction, { loading, error }] = useMutation(
- CREATE_PART_REACTION_MUTATION,
- {
- onCompleted: () => {
- navigate(routes.partReactions())
- addMessage('PartReaction created.', { classes: 'rw-flash-success' })
- },
- }
- )
-
- const onSave = (input) => {
- togglePartReaction({ variables: { input } })
- }
-
- return (
-
- )
-}
-
-export default NewPartReaction
diff --git a/web/src/components/NewUser/NewUser.js b/web/src/components/NewUser/NewUser.js
deleted file mode 100644
index 6f89a18..0000000
--- a/web/src/components/NewUser/NewUser.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { navigate, routes } from '@redwoodjs/router'
-import UserForm from 'src/components/UserForm'
-
-const CREATE_USER_MUTATION = gql`
- mutation CreateUserMutation($input: CreateUserInput!) {
- createUser(input: $input) {
- id
- }
- }
-`
-
-const NewUser = () => {
- const { addMessage } = useFlash()
- const [createUser, { loading, error }] = useMutation(CREATE_USER_MUTATION, {
- onCompleted: () => {
- navigate(routes.users())
- addMessage('User created.', { classes: 'rw-flash-success' })
- },
- })
-
- const onSave = (input) => {
- createUser({ variables: { input } })
- }
-
- return (
-
- )
-}
-
-export default NewUser
diff --git a/web/src/components/Part/Part.js b/web/src/components/Part/Part.js
deleted file mode 100644
index 4fe2e15..0000000
--- a/web/src/components/Part/Part.js
+++ /dev/null
@@ -1,111 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes, navigate } from '@redwoodjs/router'
-
-const DELETE_PART_MUTATION = gql`
- mutation DeletePartMutation($id: String!) {
- deletePart(id: $id) {
- id
- }
- }
-`
-
-const jsonDisplay = (obj) => {
- return (
-
- {JSON.stringify(obj, null, 2)}
-
- )
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const Part = ({ part }) => {
- const { addMessage } = useFlash()
- const [deletePart] = useMutation(DELETE_PART_MUTATION, {
- onCompleted: () => {
- navigate(routes.parts())
- addMessage('Part deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete part ' + id + '?')) {
- deletePart({ variables: { id } })
- }
- }
-
- return (
- <>
-
-
-
- Part {part.id} Detail
-
-
-
-
-
- | Id |
- {part.id} |
-
-
- | Title |
- {part.title} |
-
-
- | Description |
- {part.description} |
-
-
- | Code |
- {part.code} |
-
-
- | Main image |
- {part.mainImage} |
-
-
- | Created at |
- {timeTag(part.createdAt)} |
-
-
- | Updated at |
- {timeTag(part.updatedAt)} |
-
-
- | User id |
- {part.userId} |
-
-
-
-
-
- >
- )
-}
-
-export default Part
diff --git a/web/src/components/PartReaction/PartReaction.js b/web/src/components/PartReaction/PartReaction.js
deleted file mode 100644
index 82f0645..0000000
--- a/web/src/components/PartReaction/PartReaction.js
+++ /dev/null
@@ -1,103 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes, navigate } from '@redwoodjs/router'
-
-const DELETE_PART_REACTION_MUTATION = gql`
- mutation DeletePartReactionMutation($id: String!) {
- deletePartReaction(id: $id) {
- id
- }
- }
-`
-
-const jsonDisplay = (obj) => {
- return (
-
- {JSON.stringify(obj, null, 2)}
-
- )
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const PartReaction = ({ partReaction }) => {
- const { addMessage } = useFlash()
- const [deletePartReaction] = useMutation(DELETE_PART_REACTION_MUTATION, {
- onCompleted: () => {
- navigate(routes.partReactions())
- addMessage('PartReaction deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete partReaction ' + id + '?')) {
- deletePartReaction({ variables: { id } })
- }
- }
-
- return (
- <>
-
-
-
- PartReaction {partReaction.id} Detail
-
-
-
-
-
- | Id |
- {partReaction.id} |
-
-
- | Emote |
- {partReaction.emote} |
-
-
- | User id |
- {partReaction.userId} |
-
-
- | Part id |
- {partReaction.partId} |
-
-
- | Created at |
- {timeTag(partReaction.createdAt)} |
-
-
- | Updated at |
- {timeTag(partReaction.updatedAt)} |
-
-
-
-
-
- >
- )
-}
-
-export default PartReaction
diff --git a/web/src/components/PartReactionCell/PartReactionCell.js b/web/src/components/PartReactionCell/PartReactionCell.js
deleted file mode 100644
index 102916c..0000000
--- a/web/src/components/PartReactionCell/PartReactionCell.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import PartReaction from 'src/components/PartReaction'
-
-export const QUERY = gql`
- query FIND_PART_REACTION_BY_ID($id: String!) {
- partReaction: partReaction(id: $id) {
- id
- emote
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Empty = () => PartReaction not found
-
-export const Success = ({ partReaction }) => {
- return
-}
diff --git a/web/src/components/PartReactionForm/PartReactionForm.js b/web/src/components/PartReactionForm/PartReactionForm.js
deleted file mode 100644
index 5bcac9e..0000000
--- a/web/src/components/PartReactionForm/PartReactionForm.js
+++ /dev/null
@@ -1,83 +0,0 @@
-import {
- Form,
- FormError,
- FieldError,
- Label,
- TextField,
- Submit,
-} from '@redwoodjs/forms'
-
-const PartReactionForm = (props) => {
- const onSubmit = (data) => {
- props.onSave(data, props?.partReaction?.id)
- }
-
- return (
-
- )
-}
-
-export default PartReactionForm
diff --git a/web/src/components/PartReactions/PartReactions.js b/web/src/components/PartReactions/PartReactions.js
deleted file mode 100644
index 2653abc..0000000
--- a/web/src/components/PartReactions/PartReactions.js
+++ /dev/null
@@ -1,112 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes } from '@redwoodjs/router'
-
-const DELETE_PART_REACTION_MUTATION = gql`
- mutation DeletePartReactionMutation($id: String!) {
- deletePartReaction(id: $id) {
- id
- }
- }
-`
-
-const MAX_STRING_LENGTH = 150
-
-const truncate = (text) => {
- let output = text
- if (text && text.length > MAX_STRING_LENGTH) {
- output = output.substring(0, MAX_STRING_LENGTH) + '...'
- }
- return output
-}
-
-const jsonTruncate = (obj) => {
- return truncate(JSON.stringify(obj, null, 2))
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const PartReactionsList = ({ partReactions }) => {
- const { addMessage } = useFlash()
- const [deletePartReaction] = useMutation(DELETE_PART_REACTION_MUTATION, {
- onCompleted: () => {
- addMessage('PartReaction deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete partReaction ' + id + '?')) {
- deletePartReaction({
- variables: { id },
- refetchQueries: ['PART_REACTIONS'],
- })
- }
- }
-
- return (
-
-
-
-
- | Id |
- Emote |
- User id |
- Part id |
- Created at |
- Updated at |
- |
-
-
-
- {partReactions.map((partReaction) => (
-
- | {truncate(partReaction.id)} |
- {truncate(partReaction.emote)} |
- {truncate(partReaction.userId)} |
- {truncate(partReaction.partId)} |
- {timeTag(partReaction.createdAt)} |
- {timeTag(partReaction.updatedAt)} |
-
-
- |
-
- ))}
-
-
-
- )
-}
-
-export default PartReactionsList
diff --git a/web/src/components/PartReactionsCell/PartReactionsCell.js b/web/src/components/PartReactionsCell/PartReactionsCell.js
deleted file mode 100644
index 5a8b8bf..0000000
--- a/web/src/components/PartReactionsCell/PartReactionsCell.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Link, routes } from '@redwoodjs/router'
-
-import PartReactions from 'src/components/PartReactions'
-
-export const QUERY = gql`
- query PART_REACTIONS {
- partReactions {
- id
- emote
- userId
- partId
- createdAt
- updatedAt
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Empty = () => {
- return (
-
- {'No partReactions yet. '}
-
- {'Create one?'}
-
-
- )
-}
-
-export const Success = ({ partReactions }) => {
- return
-}
diff --git a/web/src/components/User/User.js b/web/src/components/User/User.js
deleted file mode 100644
index 20ba427..0000000
--- a/web/src/components/User/User.js
+++ /dev/null
@@ -1,107 +0,0 @@
-import { useMutation, useFlash } from '@redwoodjs/web'
-import { Link, routes, navigate } from '@redwoodjs/router'
-
-const DELETE_USER_MUTATION = gql`
- mutation DeleteUserMutation($id: String!) {
- deleteUser(id: $id) {
- id
- }
- }
-`
-
-const jsonDisplay = (obj) => {
- return (
-
- {JSON.stringify(obj, null, 2)}
-
- )
-}
-
-const timeTag = (datetime) => {
- return (
-
- )
-}
-
-const checkboxInputTag = (checked) => {
- return
-}
-
-const User = ({ user }) => {
- const { addMessage } = useFlash()
- const [deleteUser] = useMutation(DELETE_USER_MUTATION, {
- onCompleted: () => {
- navigate(routes.users())
- addMessage('User deleted.', { classes: 'rw-flash-success' })
- },
- })
-
- const onDeleteClick = (id) => {
- if (confirm('Are you sure you want to delete user ' + id + '?')) {
- deleteUser({ variables: { id } })
- }
- }
-
- return (
- <>
-
-
-
- User {user.id} Detail
-
-
-
-
-
- | Id |
- {user.id} |
-
-
- | User name |
- {user.userName} |
-
-
- | Email |
- {user.email} |
-
-
- | Created at |
- {timeTag(user.createdAt)} |
-
-
- | Updated at |
- {timeTag(user.updatedAt)} |
-
-
- | Image |
- {user.image} |
-
-
- | Bio |
- {user.bio} |
-
-
-
-
-
- >
- )
-}
-
-export default User
diff --git a/web/src/components/UserCell/UserCell.js b/web/src/components/UserCell/UserCell.js
deleted file mode 100644
index 7c34e11..0000000
--- a/web/src/components/UserCell/UserCell.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import User from 'src/components/User'
-
-export const QUERY = gql`
- query FIND_USER_BY_ID($id: String!) {
- user: user(id: $id) {
- id
- userName
- email
- createdAt
- updatedAt
- image
- bio
- }
- }
-`
-
-export const Loading = () => Loading...
-
-export const Empty = () => User not found
-
-export const Success = ({ user }) => {
- return
-}
diff --git a/web/src/components/UserForm/UserForm.js b/web/src/components/UserForm/UserForm.js
deleted file mode 100644
index c34107d..0000000
--- a/web/src/components/UserForm/UserForm.js
+++ /dev/null
@@ -1,99 +0,0 @@
-import {
- Form,
- FormError,
- FieldError,
- Label,
- TextField,
- Submit,
-} from '@redwoodjs/forms'
-
-const UserForm = (props) => {
- const onSubmit = (data) => {
- props.onSave(data, props?.user?.id)
- }
-
- return (
-
- )
-}
-
-export default UserForm
diff --git a/web/src/pages/CommentPage/CommentPage.js b/web/src/pages/CommentPage/CommentPage.js
deleted file mode 100644
index 9ebef8d..0000000
--- a/web/src/pages/CommentPage/CommentPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import CommentCell from 'src/components/CommentCell'
-import Seo from 'src/components/Seo/Seo'
-
-const CommentPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default CommentPage
diff --git a/web/src/pages/CommentsPage/CommentsPage.js b/web/src/pages/CommentsPage/CommentsPage.js
deleted file mode 100644
index e4b0c16..0000000
--- a/web/src/pages/CommentsPage/CommentsPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import CommentsCell from 'src/components/CommentsCell'
-import Seo from 'src/components/Seo/Seo'
-
-const CommentsPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default CommentsPage
diff --git a/web/src/pages/EditCommentPage/EditCommentPage.js b/web/src/pages/EditCommentPage/EditCommentPage.js
deleted file mode 100644
index 49ae36c..0000000
--- a/web/src/pages/EditCommentPage/EditCommentPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import EditCommentCell from 'src/components/EditCommentCell'
-import Seo from 'src/components/Seo/Seo'
-
-const EditCommentPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default EditCommentPage
diff --git a/web/src/pages/EditPartPage/EditPartPage.js b/web/src/pages/EditPartPage/EditPartPage.js
deleted file mode 100644
index 5f18cba..0000000
--- a/web/src/pages/EditPartPage/EditPartPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import EditPartCell from 'src/components/EditPartCell'
-import Seo from 'src/components/Seo/Seo'
-
-const EditPartPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default EditPartPage
diff --git a/web/src/pages/EditPartReactionPage/EditPartReactionPage.js b/web/src/pages/EditPartReactionPage/EditPartReactionPage.js
deleted file mode 100644
index 45f98d2..0000000
--- a/web/src/pages/EditPartReactionPage/EditPartReactionPage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import EditPartReactionCell from 'src/components/EditPartReactionCell'
-import Seo from 'src/components/Seo/Seo'
-
-const EditPartReactionPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default EditPartReactionPage
diff --git a/web/src/pages/EditUserPage/EditUserPage.js b/web/src/pages/EditUserPage/EditUserPage.js
deleted file mode 100644
index be558ba..0000000
--- a/web/src/pages/EditUserPage/EditUserPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import EditUserCell from 'src/components/EditUserCell'
-import Seo from 'src/components/Seo/Seo'
-
-const EditUserPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default EditUserPage
diff --git a/web/src/pages/NewCommentPage/NewCommentPage.js b/web/src/pages/NewCommentPage/NewCommentPage.js
deleted file mode 100644
index febefb0..0000000
--- a/web/src/pages/NewCommentPage/NewCommentPage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import NewComment from 'src/components/NewComment'
-import Seo from 'src/components/Seo/Seo'
-
-const NewCommentPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default NewCommentPage
diff --git a/web/src/pages/NewPartPage/NewPartPage.js b/web/src/pages/NewPartPage/NewPartPage.js
deleted file mode 100644
index 72327d3..0000000
--- a/web/src/pages/NewPartPage/NewPartPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import NewPart from 'src/components/NewPart'
-import Seo from 'src/components/Seo/Seo'
-
-const NewPartPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default NewPartPage
diff --git a/web/src/pages/NewPartReactionPage/NewPartReactionPage.js b/web/src/pages/NewPartReactionPage/NewPartReactionPage.js
deleted file mode 100644
index 7d1fa30..0000000
--- a/web/src/pages/NewPartReactionPage/NewPartReactionPage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import NewPartReaction from 'src/components/NewPartReaction'
-import Seo from 'src/components/Seo/Seo'
-
-const NewPartReactionPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default NewPartReactionPage
diff --git a/web/src/pages/NewUserPage/NewUserPage.js b/web/src/pages/NewUserPage/NewUserPage.js
deleted file mode 100644
index 389a077..0000000
--- a/web/src/pages/NewUserPage/NewUserPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import NewUser from 'src/components/NewUser'
-import Seo from 'src/components/Seo/Seo'
-
-const NewUserPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default NewUserPage
diff --git a/web/src/pages/PartPage/PartPage.js b/web/src/pages/PartPage/PartPage.js
deleted file mode 100644
index 2ef62bf..0000000
--- a/web/src/pages/PartPage/PartPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import PartCell from 'src/components/PartCell'
-import Seo from 'src/components/Seo/Seo'
-
-const PartPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default PartPage
diff --git a/web/src/pages/PartReactionPage/PartReactionPage.js b/web/src/pages/PartReactionPage/PartReactionPage.js
deleted file mode 100644
index 305e95c..0000000
--- a/web/src/pages/PartReactionPage/PartReactionPage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import PartReactionCell from 'src/components/PartReactionCell'
-import Seo from 'src/components/Seo/Seo'
-
-const PartReactionPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default PartReactionPage
diff --git a/web/src/pages/PartReactionsPage/PartReactionsPage.js b/web/src/pages/PartReactionsPage/PartReactionsPage.js
deleted file mode 100644
index b24a621..0000000
--- a/web/src/pages/PartReactionsPage/PartReactionsPage.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import PartReactionsCell from 'src/components/PartReactionsCell'
-import Seo from 'src/components/Seo/Seo'
-
-const PartReactionsPage = () => {
- return (
-
-
-
-
-
- )
-}
-
-export default PartReactionsPage
diff --git a/web/src/pages/UserPage/UserPage.js b/web/src/pages/UserPage/UserPage.js
deleted file mode 100644
index c928b93..0000000
--- a/web/src/pages/UserPage/UserPage.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import MainLayout from 'src/layouts/MainLayout'
-import UserCell from 'src/components/UserCell'
-import Seo from 'src/components/Seo/Seo'
-
-const UserPage = ({ id }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default UserPage