diff --git a/api/src/graphql/contacts.sdl.js b/api/src/graphql/contacts.sdl.js deleted file mode 100644 index c4153b6..0000000 --- a/api/src/graphql/contacts.sdl.js +++ /dev/null @@ -1,29 +0,0 @@ -export const schema = gql` - type Contact { - id: Int! - name: String! - email: String! - message: String! - createdAt: DateTime! - } - - type Query { - contacts: [Contact!]! - } - - input CreateContactInput { - name: String! - email: String! - message: String! - } - - input UpdateContactInput { - name: String - email: String - message: String - } - - type Mutation { - createContact(input: CreateContactInput!): Contact - } -` diff --git a/api/src/graphql/parts.sdl.js b/api/src/graphql/parts.sdl.js deleted file mode 100644 index bec69fa..0000000 --- a/api/src/graphql/parts.sdl.js +++ /dev/null @@ -1,35 +0,0 @@ -export const schema = gql` - type Part { - id: Int! - title: String! - description: String! - code: String! - mainImage: String! - createdAt: DateTime! - } - - type Query { - parts: [Part!]! - part(id: Int!): Part - } - - input CreatePartInput { - title: String! - description: String! - code: String - mainImage: String - } - - input UpdatePartInput { - title: String - description: String - code: String - mainImage: String - } - - type Mutation { - createPart(input: CreatePartInput!): Part! - updatePart(id: Int!, input: UpdatePartInput!): Part! - deletePart(id: Int!): Part! - } -` diff --git a/api/src/graphql/posts.sdl.js b/api/src/graphql/posts.sdl.js deleted file mode 100644 index ad384ff..0000000 --- a/api/src/graphql/posts.sdl.js +++ /dev/null @@ -1,29 +0,0 @@ -export const schema = gql` - type Post { - id: Int! - title: String! - body: String! - createdAt: DateTime! - } - - type Query { - posts: [Post!]! - post(id: Int!): Post - } - - input CreatePostInput { - title: String! - body: String! - } - - input UpdatePostInput { - title: String - body: String - } - - type Mutation { - createPost(input: CreatePostInput!): Post! - updatePost(id: Int!, input: UpdatePostInput!): Post! - deletePost(id: Int!): Post! - } -` diff --git a/api/src/graphql/users.sdl.js b/api/src/graphql/users.sdl.js deleted file mode 100644 index 366075d..0000000 --- a/api/src/graphql/users.sdl.js +++ /dev/null @@ -1,35 +0,0 @@ -export const schema = gql` - type User { - id: Int! - email: String! - createdAt: DateTime! - updatedAt: DateTime! - image: String - bio: String - } - - type Query { - users: [User!]! - user(id: Int!): User - } - - input CreateUserInput { - email: String! - # issuer: String! - image: String - bio: String - } - - input UpdateUserInput { - email: String - # issuer: String - image: String - bio: String - } - - type Mutation { - createUser(input: CreateUserInput!): User! - updateUser(id: Int!, input: UpdateUserInput!): User! - deleteUser(id: Int!): User! - } -` diff --git a/api/src/services/contacts/contacts.js b/api/src/services/contacts/contacts.js deleted file mode 100644 index 3481975..0000000 --- a/api/src/services/contacts/contacts.js +++ /dev/null @@ -1,24 +0,0 @@ -import { UserInputError } from '@redwoodjs/api' - -import { db } from 'src/lib/db' - - -const validate = (input) => { - if (input.email && !input.email.match(/[^@]+@[^.]+\..+/)) { - throw new UserInputError("Can't create new contact", { - messages: { - email: ['is not formatted like an email address'], - }, - }) - } -} - -export const contacts = () => { - return db.contact.findMany() -} - -export const createContact = ({ input }) => { - - validate(input) - return db.contact.create({ data: input }) -} diff --git a/api/src/services/contacts/contacts.test.js b/api/src/services/contacts/contacts.test.js deleted file mode 100644 index fbbbc1e..0000000 --- a/api/src/services/contacts/contacts.test.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -import { contacts } from './contacts' -*/ - -describe('contacts', () => { - it('returns true', () => { - expect(true).toBe(true) - }) -}) diff --git a/api/src/services/parts/parts.js b/api/src/services/parts/parts.js deleted file mode 100644 index 98c6243..0000000 --- a/api/src/services/parts/parts.js +++ /dev/null @@ -1,30 +0,0 @@ -import { db } from 'src/lib/db' - -export const parts = () => { - return db.part.findMany() -} - -export const part = ({ id }) => { - return db.part.findOne({ - where: { id }, - }) -} - -export const createPart = ({ input }) => { - return db.part.create({ - data: input, - }) -} - -export const updatePart = ({ id, input }) => { - return db.part.update({ - data: input, - where: { id }, - }) -} - -export const deletePart = ({ id }) => { - return db.part.delete({ - where: { id }, - }) -} diff --git a/api/src/services/parts/parts.test.js b/api/src/services/parts/parts.test.js deleted file mode 100644 index e8b80ce..0000000 --- a/api/src/services/parts/parts.test.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -import { parts } from './parts' -*/ - -describe('parts', () => { - it('returns true', () => { - expect(true).toBe(true) - }) -}) diff --git a/api/src/services/posts/posts.js b/api/src/services/posts/posts.js deleted file mode 100644 index 8912a71..0000000 --- a/api/src/services/posts/posts.js +++ /dev/null @@ -1,34 +0,0 @@ -import { db } from 'src/lib/db' -import { requireAuth } from 'src/lib/auth' - -export const posts = () => { - return db.post.findMany() -} - -export const post = ({ id }) => { - return db.post.findOne({ - where: { id }, - }) -} - -export const createPost = ({ input }) => { - requireAuth() - return db.post.create({ - data: input, - }) -} - -export const updatePost = ({ id, input }) => { - requireAuth() - return db.post.update({ - data: input, - where: { id }, - }) -} - -export const deletePost = ({ id }) => { - requireAuth() - return db.post.delete({ - where: { id }, - }) -} diff --git a/api/src/services/posts/posts.test.js b/api/src/services/posts/posts.test.js deleted file mode 100644 index f23483a..0000000 --- a/api/src/services/posts/posts.test.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -import { posts } from './posts' -*/ - -describe('posts', () => { - it('returns true', () => { - expect(true).toBe(true) - }) -}) diff --git a/api/src/services/users/users.js b/api/src/services/users/users.js deleted file mode 100644 index 3d3675c..0000000 --- a/api/src/services/users/users.js +++ /dev/null @@ -1,40 +0,0 @@ -import { db } from 'src/lib/db' -import { requireAuth } from 'src/lib/auth' - -export const users = () => { - requireAuth({ role: 'admin' }) - return db.user.findMany() -} - -export const user = ({ id }) => { - requireAuth() - return db.user.findOne({ - where: { id }, - }) -} - -export const createUser = ({ input }) => { - requireAuth({ role: 'admin' }) - return createUserInsecure({input}) -} - -export const createUserInsecure = ({ input }) => { - return db.user.create({ - data: input, - }) -} - -export const updateUser = ({ id, input }) => { - requireAuth() - return db.user.update({ - data: input, - where: { id }, - }) -} - -export const deleteUser = ({ id }) => { - requireAuth({ role: 'admin' }) - return db.user.delete({ - where: { id }, - }) -} diff --git a/api/src/services/users/users.test.js b/api/src/services/users/users.test.js deleted file mode 100644 index bac7cb4..0000000 --- a/api/src/services/users/users.test.js +++ /dev/null @@ -1,9 +0,0 @@ -/* -import { users } from './users' -*/ - -describe('users', () => { - it('returns true', () => { - expect(true).toBe(true) - }) -}) diff --git a/web/src/Routes.js b/web/src/Routes.js index 8255681..c9ebd82 100644 --- a/web/src/Routes.js +++ b/web/src/Routes.js @@ -12,30 +12,8 @@ import { Router, Route, Private } from '@redwoodjs/router' const Routes = () => { return ( - {/* TODO add add min role to users and users/new */} - - - - - - - - - - - - - - - - - - - - - - + ) diff --git a/web/src/components/BlogPost/BlogPost.js b/web/src/components/BlogPost/BlogPost.js deleted file mode 100644 index 524ee4b..0000000 --- a/web/src/components/BlogPost/BlogPost.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -const BlogPost = ({ post }) => { - return ( -
-
-

- {post.title} -

-
-
{post.body}
-
- ) -} - -export default BlogPost \ No newline at end of file diff --git a/web/src/components/BlogPost/BlogPost.stories.js b/web/src/components/BlogPost/BlogPost.stories.js deleted file mode 100644 index 03e9f5f..0000000 --- a/web/src/components/BlogPost/BlogPost.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import BlogPost from './BlogPost' - -export const generated = () => { - return -} - -export default { title: 'Components/BlogPost' } diff --git a/web/src/components/BlogPost/BlogPost.test.js b/web/src/components/BlogPost/BlogPost.test.js deleted file mode 100644 index 87f976f..0000000 --- a/web/src/components/BlogPost/BlogPost.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { render } from '@redwoodjs/testing' - -import BlogPost from './BlogPost' - -describe('BlogPost', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/web/src/components/BlogPostCell/BlogPostCell.js b/web/src/components/BlogPostCell/BlogPostCell.js deleted file mode 100644 index fd7987f..0000000 --- a/web/src/components/BlogPostCell/BlogPostCell.js +++ /dev/null @@ -1,22 +0,0 @@ -import BlogPost from 'src/components/BlogPost' - -export const QUERY = gql` - query BlogPostQuery($id: Int!) { - post(id: $id) { - id - title - body - createdAt - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () =>
Empty
- -export const Failure = ({ error }) =>
Error: {error.message}
- -export const Success = ({ post }) => { - return -} diff --git a/web/src/components/BlogPostCell/BlogPostCell.mock.js b/web/src/components/BlogPostCell/BlogPostCell.mock.js deleted file mode 100644 index c689622..0000000 --- a/web/src/components/BlogPostCell/BlogPostCell.mock.js +++ /dev/null @@ -1,6 +0,0 @@ -// Define your own mock data here: -export const standard = (/* vars, { ctx, req } */) => ({ - blogPost: { - id: 42, - }, -}) diff --git a/web/src/components/BlogPostCell/BlogPostCell.stories.js b/web/src/components/BlogPostCell/BlogPostCell.stories.js deleted file mode 100644 index 597ce5f..0000000 --- a/web/src/components/BlogPostCell/BlogPostCell.stories.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Loading, Empty, Failure, Success } from './BlogPostCell' -import { standard } from './BlogPostCell.mock' - -export const loading = () => { - return Loading ? : null -} - -export const empty = () => { - return Empty ? : null -} - -export const failure = () => { - return Failure ? : null -} - -export const success = () => { - return Success ? : null -} - -export default { title: 'Cells/BlogPostCell' } diff --git a/web/src/components/BlogPostCell/BlogPostCell.test.js b/web/src/components/BlogPostCell/BlogPostCell.test.js deleted file mode 100644 index 61adcd6..0000000 --- a/web/src/components/BlogPostCell/BlogPostCell.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import { render, screen } from '@redwoodjs/testing' -import { Loading, Empty, Failure, Success } from './BlogPostCell' -import { standard } from './BlogPostCell.mock' - -describe('BlogPostCell', () => { - test('Loading renders successfully', () => { - render() - // Use screen.debug() to see output - expect(screen.getByText('Loading...')).toBeInTheDocument() - }) - - test('Empty renders successfully', async () => { - render() - expect(screen.getByText('Empty')).toBeInTheDocument() - }) - - test('Failure renders successfully', async () => { - render() - expect(screen.getByText(/Oh no/i)).toBeInTheDocument() - }) - - test('Success renders successfully', async () => { - render() - expect(screen.getByText(/42/i)).toBeInTheDocument() - }) -}) diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.js b/web/src/components/BlogPostsCell/BlogPostsCell.js deleted file mode 100644 index 1d4cb61..0000000 --- a/web/src/components/BlogPostsCell/BlogPostsCell.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import BlogPost from 'src/components/BlogPost' - -export const QUERY = gql` - query BlogPostsQuery { - posts { - id - title - body - createdAt - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () =>
Empty
- -export const Failure = ({ error }) =>
Error: {error.message}
- -export const Success = ({ posts }) => { - return posts.map((post) => ) -} diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.mock.js b/web/src/components/BlogPostsCell/BlogPostsCell.mock.js deleted file mode 100644 index 70d4d6a..0000000 --- a/web/src/components/BlogPostsCell/BlogPostsCell.mock.js +++ /dev/null @@ -1,6 +0,0 @@ -// Define your own mock data here: -export const standard = (/* vars, { ctx, req } */) => ({ - blogPosts: { - id: 42, - }, -}) diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.stories.js b/web/src/components/BlogPostsCell/BlogPostsCell.stories.js deleted file mode 100644 index 841d3b2..0000000 --- a/web/src/components/BlogPostsCell/BlogPostsCell.stories.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Loading, Empty, Failure, Success } from './BlogPostsCell' -import { standard } from './BlogPostsCell.mock' - -export const loading = () => { - return Loading ? : null -} - -export const empty = () => { - return Empty ? : null -} - -export const failure = () => { - return Failure ? : null -} - -export const success = () => { - return Success ? : null -} - -export default { title: 'Cells/BlogPostsCell' } diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.test.js b/web/src/components/BlogPostsCell/BlogPostsCell.test.js deleted file mode 100644 index 0d1fc66..0000000 --- a/web/src/components/BlogPostsCell/BlogPostsCell.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import { render, screen } from '@redwoodjs/testing' -import { Loading, Empty, Failure, Success } from './BlogPostsCell' -import { standard } from './BlogPostsCell.mock' - -describe('BlogPostsCell', () => { - test('Loading renders successfully', () => { - render() - // Use screen.debug() to see output - expect(screen.getByText('Loading...')).toBeInTheDocument() - }) - - test('Empty renders successfully', async () => { - render() - expect(screen.getByText('Empty')).toBeInTheDocument() - }) - - test('Failure renders successfully', async () => { - render() - expect(screen.getByText(/Oh no/i)).toBeInTheDocument() - }) - - test('Success renders successfully', async () => { - render() - expect(screen.getByText(/42/i)).toBeInTheDocument() - }) -}) diff --git a/web/src/components/EditPartCell/EditPartCell.js b/web/src/components/EditPartCell/EditPartCell.js deleted file mode 100644 index b434a62..0000000 --- a/web/src/components/EditPartCell/EditPartCell.js +++ /dev/null @@ -1,35 +0,0 @@ -import { useMutation } from '@redwoodjs/web' -import PartForm from 'src/components/PartForm' - -export const QUERY = gql` - query FIND_PART_BY_ID($id: Int!) { - part: part(id: $id) { - id - title - description - code - mainImage - createdAt - } - } -` -const UPDATE_PART_MUTATION = gql` - mutation UpdatePartMutation($id: Int!, $input: UpdatePartInput!) { - updatePart(id: $id, input: $input) { - id - code - } - } -` - -export const Loading = () =>
Loading...
- -export const Success = ({ part }) => { - const [updatePart, { loading, error }] = useMutation(UPDATE_PART_MUTATION) - - const onSave = (input, id) => updatePart({ variables: { id, input } }) - - return ( - - ) -} diff --git a/web/src/components/EditPostCell/EditPostCell.js b/web/src/components/EditPostCell/EditPostCell.js deleted file mode 100644 index 904e44a..0000000 --- a/web/src/components/EditPostCell/EditPostCell.js +++ /dev/null @@ -1,48 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { navigate, routes } from '@redwoodjs/router' -import PostForm from 'src/components/PostForm' - -export const QUERY = gql` - query FIND_POST_BY_ID($id: Int!) { - post: post(id: $id) { - id - title - body - createdAt - } - } -` -const UPDATE_POST_MUTATION = gql` - mutation UpdatePostMutation($id: Int!, $input: UpdatePostInput!) { - updatePost(id: $id, input: $input) { - id - } - } -` - -export const Loading = () =>
Loading...
- -export const Success = ({ post }) => { - const { addMessage } = useFlash() - const [updatePost, { loading, error }] = useMutation(UPDATE_POST_MUTATION, { - onCompleted: () => { - navigate(routes.posts()) - addMessage('Post updated.', { classes: 'rw-flash-success' }) - }, - }) - - const onSave = (input, id) => { - updatePost({ variables: { id, input } }) - } - - return ( -
-
-

Edit Post {post.id}

-
-
- -
-
- ) -} diff --git a/web/src/components/EditUserCell/EditUserCell.js b/web/src/components/EditUserCell/EditUserCell.js deleted file mode 100644 index 34f940c..0000000 --- a/web/src/components/EditUserCell/EditUserCell.js +++ /dev/null @@ -1,50 +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: Int!) { - user: user(id: $id) { - id - email - createdAt - updatedAt - image - bio - } - } -` -const UPDATE_USER_MUTATION = gql` - mutation UpdateUserMutation($id: Int!, $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 ( -
-
-

Edit User {user.id}

-
-
- -
-
- ) -} 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 ( -
-
-

New Part

-
-
- -
-
- ) -} - -export default NewPart diff --git a/web/src/components/NewPost/NewPost.js b/web/src/components/NewPost/NewPost.js deleted file mode 100644 index ff4eec2..0000000 --- a/web/src/components/NewPost/NewPost.js +++ /dev/null @@ -1,38 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { navigate, routes } from '@redwoodjs/router' -import PostForm from 'src/components/PostForm' - -const CREATE_POST_MUTATION = gql` - mutation CreatePostMutation($input: CreatePostInput!) { - createPost(input: $input) { - id - } - } -` - -const NewPost = () => { - const { addMessage } = useFlash() - const [createPost, { loading, error }] = useMutation(CREATE_POST_MUTATION, { - onCompleted: () => { - navigate(routes.posts()) - addMessage('Post created.', { classes: 'rw-flash-success' }) - }, - }) - - const onSave = (input) => { - createPost({ variables: { input } }) - } - - return ( -
-
-

New Post

-
-
- -
-
- ) -} - -export default NewPost 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 ( -
-
-

New User

-
-
- -
-
- ) -} - -export default NewUser diff --git a/web/src/components/Part/Part.js b/web/src/components/Part/Part.js deleted file mode 100644 index b132dbc..0000000 --- a/web/src/components/Part/Part.js +++ /dev/null @@ -1,110 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes, navigate } from '@redwoodjs/router' -import { initialize } from 'src/cascade/js/MainPage/CascadeMain' -import { useEffect, useState } from 'react' - -const DELETE_PART_MUTATION = gql` - mutation DeletePartMutation($id: Int!) { - deletePart(id: $id) { - id - } - } -` - -const Part = ({ part, saveCode, loading, error}) => { - const [code, setCode] = useState(part.code) - useEffect(() => { - const sickCallback = (code) => setCode(code) - initialize(sickCallback, part.code) - }, []) - const hasChanges = code !== part.code - 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 -

-
- - - - - - - - - - - {/* - - - */} - {/* - - - */} - {/* - - - */} - -
Title{part.title}
Description{part.description}
Code{part.code}
Main image{part.mainImage}
Created at{timeTag(part.createdAt)}
- -
- - - - ) -} - -export default Part diff --git a/web/src/components/PartCell/PartCell.js b/web/src/components/PartCell/PartCell.js deleted file mode 100644 index 22044f0..0000000 --- a/web/src/components/PartCell/PartCell.js +++ /dev/null @@ -1,32 +0,0 @@ - -import {QUERY as reExportQuery} from 'src/components/EditPartCell' -import Editor from "rich-markdown-editor"; - -export const QUERY = reExportQuery - -export const Loading = () =>
Loading...
- -export const Empty = () =>
Empty
- -export const Failure = ({ error }) =>
Error: {error.message}
- -export const Success = ({ part }) => { - console.log(part) - return ( - <> -
-
- -
-
-

{part.title}

- -
-
- - ) -} diff --git a/web/src/components/PartForm/PartForm.js b/web/src/components/PartForm/PartForm.js deleted file mode 100644 index daecc16..0000000 --- a/web/src/components/PartForm/PartForm.js +++ /dev/null @@ -1,93 +0,0 @@ -import { - Form, - FormError, - FieldError, - Label, - TextField, - Submit, -} from '@redwoodjs/forms' -import { useState } from 'react'; -import { navigate, routes } from '@redwoodjs/router' -import { useFlash } from '@redwoodjs/web' -import ImageUploader from './ImageUploader.js' - - -import Editor from "rich-markdown-editor"; - -const PartForm = (props) => { - const { addMessage } = useFlash() - const [description, setDescription] = useState(props?.part?.description) - const [imageUrl, setImageUrl] = useState(props?.part?.mainImage) - const onSubmit = async (data, e) => { - - await props.onSave({ - ...data, - description, - mainImage: imageUrl - }, props?.part?.id) - const shouldOpenIde = e?.nativeEvent?.submitter?.dataset?.openIde - if(shouldOpenIde) { - navigate(routes.partIde({id: props?.part?.id})) - } else { - navigate(routes.part({id: props?.part?.id})) - } - addMessage('Part updated.', { classes: 'rw-flash-success' }) - } - - return ( -
-
- - - - - - - setImageUrl(cloudinaryPublicId)} /> - - - -
- setDescription(valueFn())} - /> -
- -
- - Save - - - Save and open IDE - -
- -
- ) -} - -export default PartForm diff --git a/web/src/components/Parts/Parts.js b/web/src/components/Parts/Parts.js deleted file mode 100644 index 8f49c7b..0000000 --- a/web/src/components/Parts/Parts.js +++ /dev/null @@ -1,89 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes } from '@redwoodjs/router' -import { Image as CloudinaryImage } from 'cloudinary-react' - -import avatar from 'src/assets/harold.jpg' - -const DELETE_PART_MUTATION = gql` - mutation DeletePartMutation($id: Int!) { - deletePart(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 PartsList = ({ parts }) => { - const { addMessage } = useFlash() - const [deletePart] = useMutation(DELETE_PART_MUTATION, { - onCompleted: () => { - addMessage('Part deleted.', { classes: 'rw-flash-success' }) - }, - }) - - const onDeleteClick = (id) => { - if (confirm('Are you sure you want to delete part ' + id + '?')) { - deletePart({ variables: { id }, refetchQueries: ['PARTS'] }) - } - } - - return ( -
- {parts.map((part) => { - return ( - -
-
-
?
-
- -
-

{part.title}

-
-
- -
-
- - )})} -
- ) -} - -export default PartsList diff --git a/web/src/components/PartsCell/PartsCell.js b/web/src/components/PartsCell/PartsCell.js deleted file mode 100644 index 98380e8..0000000 --- a/web/src/components/PartsCell/PartsCell.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -import Parts from 'src/components/Parts' - -export const QUERY = gql` - query PARTS { - parts { - id - title - description - code - mainImage - createdAt - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () => { - return ( -
- {'No parts yet. '} - - {'Create one?'} - -
- ) -} - -export const Success = ({ parts }) => { - return -} diff --git a/web/src/components/Post/Post.js b/web/src/components/Post/Post.js deleted file mode 100644 index ff9c448..0000000 --- a/web/src/components/Post/Post.js +++ /dev/null @@ -1,95 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes, navigate } from '@redwoodjs/router' - -const DELETE_POST_MUTATION = gql` - mutation DeletePostMutation($id: Int!) { - deletePost(id: $id) { - id - } - } -` - -const jsonDisplay = (obj) => { - return ( -
-      {JSON.stringify(obj, null, 2)}
-    
- ) -} - -const timeTag = (datetime) => { - return ( - - ) -} - -const checkboxInputTag = (checked) => { - return -} - -const Post = ({ post }) => { - const { addMessage } = useFlash() - const [deletePost] = useMutation(DELETE_POST_MUTATION, { - onCompleted: () => { - navigate(routes.posts()) - addMessage('Post deleted.', { classes: 'rw-flash-success' }) - }, - }) - - const onDeleteClick = (id) => { - if (confirm('Are you sure you want to delete post ' + id + '?')) { - deletePost({ variables: { id } }) - } - } - - return ( - <> -
-
-

- Post {post.id} Detail -

-
- - - - - - - - - - - - - - - - - - - -
Id{post.id}
Title{post.title}
Body{post.body}
Created at{timeTag(post.createdAt)}
-
- - - ) -} - -export default Post diff --git a/web/src/components/PostCell/PostCell.js b/web/src/components/PostCell/PostCell.js deleted file mode 100644 index 65a507b..0000000 --- a/web/src/components/PostCell/PostCell.js +++ /dev/null @@ -1,20 +0,0 @@ -import Post from 'src/components/Post' - -export const QUERY = gql` - query FIND_POST_BY_ID($id: Int!) { - post: post(id: $id) { - id - title - body - createdAt - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () =>
Post not found
- -export const Success = ({ post }) => { - return -} diff --git a/web/src/components/PostForm/PostForm.js b/web/src/components/PostForm/PostForm.js deleted file mode 100644 index 90f5ff4..0000000 --- a/web/src/components/PostForm/PostForm.js +++ /dev/null @@ -1,67 +0,0 @@ -import { - Form, - FormError, - FieldError, - Label, - TextField, - Submit, -} from '@redwoodjs/forms' - -const PostForm = (props) => { - const onSubmit = (data) => { - props.onSave(data, props?.post?.id) - } - - return ( -
-
- - - - - - - - - - -
- - Save - -
- -
- ) -} - -export default PostForm diff --git a/web/src/components/Posts/Posts.js b/web/src/components/Posts/Posts.js deleted file mode 100644 index 81f4b76..0000000 --- a/web/src/components/Posts/Posts.js +++ /dev/null @@ -1,105 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes } from '@redwoodjs/router' - -const DELETE_POST_MUTATION = gql` - mutation DeletePostMutation($id: Int!) { - deletePost(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 PostsList = ({ posts }) => { - const { addMessage } = useFlash() - const [deletePost] = useMutation(DELETE_POST_MUTATION, { - onCompleted: () => { - addMessage('Post deleted.', { classes: 'rw-flash-success' }) - }, - }) - - const onDeleteClick = (id) => { - if (confirm('Are you sure you want to delete post ' + id + '?')) { - deletePost({ variables: { id }, refetchQueries: ['POSTS'] }) - } - } - - return ( -
- - - - - - - - - - - - {posts.map((post) => ( - - - - - - - - ))} - -
IdTitleBodyCreated at 
{truncate(post.id)}{truncate(post.title)}{truncate(post.body)}{timeTag(post.createdAt)} - -
-
- ) -} - -export default PostsList diff --git a/web/src/components/PostsCell/PostsCell.js b/web/src/components/PostsCell/PostsCell.js deleted file mode 100644 index ddf49cd..0000000 --- a/web/src/components/PostsCell/PostsCell.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -import Posts from 'src/components/Posts' - -export const QUERY = gql` - query POSTS { - posts { - id - title - body - createdAt - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () => { - return ( -
- {'No posts yet. '} - - {'Create one?'} - -
- ) -} - -export const Success = ({ posts }) => { - return -} diff --git a/web/src/components/User/User.js b/web/src/components/User/User.js deleted file mode 100644 index bc23faf..0000000 --- a/web/src/components/User/User.js +++ /dev/null @@ -1,109 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes, navigate } from '@redwoodjs/router' -import { Image as CloudinaryImage } from 'cloudinary-react' -const DELETE_USER_MUTATION = gql` - mutation DeleteUserMutation($id: Int!) { - 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}
Email{user.email}
Created at{timeTag(user.createdAt)}
Updated at{timeTag(user.updatedAt)}
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 f89a7fd..0000000 --- a/web/src/components/UserCell/UserCell.js +++ /dev/null @@ -1,22 +0,0 @@ -import User from 'src/components/User' - -export const QUERY = gql` - query FIND_USER_BY_ID($id: Int!) { - user: user(id: $id) { - id - 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 fdc74c2..0000000 --- a/web/src/components/UserForm/UserForm.js +++ /dev/null @@ -1,79 +0,0 @@ -import { - Form, - FormError, - FieldError, - Label, - TextField, - Submit, -} from '@redwoodjs/forms' -import { useState } from 'react'; -import { navigate, routes } from '@redwoodjs/router' -import { useFlash } from '@redwoodjs/web' -import ImageUploader from '../PartForm/ImageUploader' -const UserForm = (props) => { - const { addMessage } = useFlash() - // const [bio, setBio] = useState(props?.user?.bio) - const [imageUrl, setImageUrl] = useState(props?.user?.image) - const onSubmit = async (data, e) => { - - await props.onSave({ - ...data, - image: imageUrl - }, props?.user?.id) - addMessage('User updated.', { classes: 'rw-flash-success' }) - } - - return ( -
-
- - - - - - setImageUrl(cloudinaryPublicId)} /> - - - - - -
- - Save - -
- -
- ) -} - -export default UserForm diff --git a/web/src/components/UserPart/UserPart.js b/web/src/components/UserPart/UserPart.js deleted file mode 100644 index 83256b2..0000000 --- a/web/src/components/UserPart/UserPart.js +++ /dev/null @@ -1,16 +0,0 @@ -function UserPart({ userName, partName }) { - return ( -

-
.
- - {userName} - -
.
- - {partName} - -

- ) -} - -export default UserPart diff --git a/web/src/components/Users/Users.js b/web/src/components/Users/Users.js deleted file mode 100644 index 427139e..0000000 --- a/web/src/components/Users/Users.js +++ /dev/null @@ -1,109 +0,0 @@ -import { useMutation, useFlash } from '@redwoodjs/web' -import { Link, routes } from '@redwoodjs/router' - -const DELETE_USER_MUTATION = gql` - mutation DeleteUserMutation($id: Int!) { - deleteUser(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 UsersList = ({ users }) => { - const { addMessage } = useFlash() - const [deleteUser] = useMutation(DELETE_USER_MUTATION, { - onCompleted: () => { - addMessage('User deleted.', { classes: 'rw-flash-success' }) - }, - }) - - const onDeleteClick = (id) => { - if (confirm('Are you sure you want to delete user ' + id + '?')) { - deleteUser({ variables: { id }, refetchQueries: ['USERS'] }) - } - } - - return ( -
- - - - - - - - - - - - - - {users.map((user) => ( - - - - - - - - - - ))} - -
IdEmailCreated atUpdated atImageBio 
{truncate(user.id)}{truncate(user.email)}{timeTag(user.createdAt)}{timeTag(user.updatedAt)}{truncate(user.image)}{truncate(user.bio)} - -
-
- ) -} - -export default UsersList diff --git a/web/src/components/UsersCell/UsersCell.js b/web/src/components/UsersCell/UsersCell.js deleted file mode 100644 index 9fb8655..0000000 --- a/web/src/components/UsersCell/UsersCell.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -import Users from 'src/components/Users' - -export const QUERY = gql` - query USERS { - users { - id - email - createdAt - updatedAt - image - bio - } - } -` - -export const Loading = () =>
Loading...
- -export const Empty = () => { - return ( -
- {'No users yet. '} - - {'Create one?'} - -
- ) -} - -export const Success = ({ users }) => { - return -} diff --git a/web/src/index.html b/web/src/index.html index b13cef6..947ea10 100644 --- a/web/src/index.html +++ b/web/src/index.html @@ -38,7 +38,7 @@ } } } - coolGuy() + // coolGuy() diff --git a/web/src/layouts/BlogLayout/BlogLayout.js b/web/src/layouts/BlogLayout/BlogLayout.js deleted file mode 100644 index 54134d9..0000000 --- a/web/src/layouts/BlogLayout/BlogLayout.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' - -const BlogLayout = ({ children }) => { - return ( - <> -
-

Redwood Blog

- -
-
{children}
- - ) -} - -export default BlogLayout diff --git a/web/src/layouts/BlogLayout/BlogLayout.stories.js b/web/src/layouts/BlogLayout/BlogLayout.stories.js deleted file mode 100644 index 4e249ec..0000000 --- a/web/src/layouts/BlogLayout/BlogLayout.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import BlogLayout from './BlogLayout' - -export const generated = () => { - return -} - -export default { title: 'Layouts/BlogLayout' } diff --git a/web/src/layouts/BlogLayout/BlogLayout.test.js b/web/src/layouts/BlogLayout/BlogLayout.test.js deleted file mode 100644 index b87e730..0000000 --- a/web/src/layouts/BlogLayout/BlogLayout.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { render } from '@redwoodjs/testing' - -import BlogLayout from './BlogLayout' - -describe('BlogLayout', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/web/src/layouts/PartsLayout/PartsLayout.js b/web/src/layouts/PartsLayout/PartsLayout.js deleted file mode 100644 index 7234e1d..0000000 --- a/web/src/layouts/PartsLayout/PartsLayout.js +++ /dev/null @@ -1,11 +0,0 @@ - - -const PartsLayout = (props) => { - return ( -
-
{props.children}
-
- ) -} - -export default PartsLayout diff --git a/web/src/layouts/PostsLayout/PostsLayout.js b/web/src/layouts/PostsLayout/PostsLayout.js deleted file mode 100644 index 45578ce..0000000 --- a/web/src/layouts/PostsLayout/PostsLayout.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import { Flash } from '@redwoodjs/web' - -const PostsLayout = (props) => { - return ( -
- -
-

- - Posts - -

- -
+
New Post - -
-
{props.children}
-
- ) -} - -export default PostsLayout diff --git a/web/src/pages/AboutPage/AboutPage.js b/web/src/pages/AboutPage/AboutPage.js deleted file mode 100644 index 71a730c..0000000 --- a/web/src/pages/AboutPage/AboutPage.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Link, routes } from '@redwoodjs/router' -import BlogLayout from 'src/layouts/BlogLayout' - -const AboutPage = () => { - return ( - -

AboutPage

-

- Find me in ./web/src/pages/AboutPage/AboutPage.js -

-

- My default route is named about, link to me with ` - About` -

-
- ) -} - -export default AboutPage diff --git a/web/src/pages/AboutPage/AboutPage.stories.js b/web/src/pages/AboutPage/AboutPage.stories.js deleted file mode 100644 index 3ca853b..0000000 --- a/web/src/pages/AboutPage/AboutPage.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import AboutPage from './AboutPage' - -export const generated = () => { - return -} - -export default { title: 'Pages/AboutPage' } diff --git a/web/src/pages/AboutPage/AboutPage.test.js b/web/src/pages/AboutPage/AboutPage.test.js deleted file mode 100644 index 6878394..0000000 --- a/web/src/pages/AboutPage/AboutPage.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { render } from '@redwoodjs/testing' - -import AboutPage from './AboutPage' - -describe('AboutPage', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/web/src/pages/BlogPostPage/BlogPostPage.js b/web/src/pages/BlogPostPage/BlogPostPage.js deleted file mode 100644 index 7f1e9c3..0000000 --- a/web/src/pages/BlogPostPage/BlogPostPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import BlogLayout from 'src/layouts/BlogLayout' -import BlogPostCell from 'src/components/BlogPostCell' - -const BlogPostPage = ({id}) => { - return ( - - - - ) -} - -export default BlogPostPage diff --git a/web/src/pages/BlogPostPage/BlogPostPage.stories.js b/web/src/pages/BlogPostPage/BlogPostPage.stories.js deleted file mode 100644 index 5e9fa74..0000000 --- a/web/src/pages/BlogPostPage/BlogPostPage.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import BlogPostPage from './BlogPostPage' - -export const generated = () => { - return -} - -export default { title: 'Pages/BlogPostPage' } diff --git a/web/src/pages/BlogPostPage/BlogPostPage.test.js b/web/src/pages/BlogPostPage/BlogPostPage.test.js deleted file mode 100644 index cb14ea6..0000000 --- a/web/src/pages/BlogPostPage/BlogPostPage.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { render } from '@redwoodjs/testing' - -import BlogPostPage from './BlogPostPage' - -describe('BlogPostPage', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/web/src/pages/ContactPage/ContactPage.js b/web/src/pages/ContactPage/ContactPage.js deleted file mode 100644 index 088f0b6..0000000 --- a/web/src/pages/ContactPage/ContactPage.js +++ /dev/null @@ -1,59 +0,0 @@ -import { Form, TextField, Submit, TextAreaField, FieldError, FormError } from '@redwoodjs/forms' -import { useMutation, Flash, useFlash } from '@redwoodjs/web' -import MainLayout from 'src/layouts/MainLayout' -import { useForm } from 'react-hook-form' - -const CREATE_CONTACT = gql` - mutation CreateContactMutation($input: CreateContactInput!) { - createContact(input: $input) { - id - } - } -` - -const ContactPage = () => { - const formMethods = useForm() - const { addMessage } = useFlash() - const [create, {loading, error}] = useMutation(CREATE_CONTACT, { - onCompleted: () => { - addMessage('Thank you for your submission!', { - style: { backgroundColor: 'green', color: 'white', padding: '1rem' } - }) - formMethods.reset() - }, - }) - const onSubmit = async (data) => { - try { - await create({ variables: { input: data } }) - } catch (error) { - console.log(error) - } - } - - return ( - - -
- - - - - - - - - - - - - - Save - -
- ) -} - -export default ContactPage diff --git a/web/src/pages/ContactPage/ContactPage.stories.js b/web/src/pages/ContactPage/ContactPage.stories.js deleted file mode 100644 index 0894c0b..0000000 --- a/web/src/pages/ContactPage/ContactPage.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import ContactPage from './ContactPage' - -export const generated = () => { - return -} - -export default { title: 'Pages/ContactPage' } diff --git a/web/src/pages/ContactPage/ContactPage.test.js b/web/src/pages/ContactPage/ContactPage.test.js deleted file mode 100644 index d31f442..0000000 --- a/web/src/pages/ContactPage/ContactPage.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import { render } from '@redwoodjs/testing' - -import ContactPage from './ContactPage' - -describe('ContactPage', () => { - it('renders successfully', () => { - expect(() => { - render() - }).not.toThrow() - }) -}) diff --git a/web/src/pages/EditPartPage/EditPartPage.js b/web/src/pages/EditPartPage/EditPartPage.js deleted file mode 100644 index 82d3b66..0000000 --- a/web/src/pages/EditPartPage/EditPartPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import EditPartCell from 'src/components/EditPartCell' -import MainLayout from 'src/layouts/MainLayout' - -const EditPartPage = ({ id }) => { - return ( - - - - ) -} - -export default EditPartPage diff --git a/web/src/pages/EditPostPage/EditPostPage.js b/web/src/pages/EditPostPage/EditPostPage.js deleted file mode 100644 index 419af6b..0000000 --- a/web/src/pages/EditPostPage/EditPostPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import PostsLayout from 'src/layouts/PostsLayout' -import EditPostCell from 'src/components/EditPostCell' - -const EditPostPage = ({ id }) => { - return ( - - - - ) -} - -export default EditPostPage diff --git a/web/src/pages/EditUserPage/EditUserPage.js b/web/src/pages/EditUserPage/EditUserPage.js deleted file mode 100644 index 5c8fa8d..0000000 --- a/web/src/pages/EditUserPage/EditUserPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import EditUserCell from 'src/components/EditUserCell' - -const EditUserPage = ({ id }) => { - return ( - - - - ) -} - -export default EditUserPage diff --git a/web/src/pages/IdePartPage/IdePartPage.stories.js b/web/src/pages/IdePartPage/IdePartPage.stories.js deleted file mode 100644 index 6bfa9a4..0000000 --- a/web/src/pages/IdePartPage/IdePartPage.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -import IdePartPage from './IdePartPage' - -export const generated = () => { - return -} - -export default { title: 'Pages/IdePartPage' } diff --git a/web/src/pages/NewPartPage/NewPartPage.js b/web/src/pages/NewPartPage/NewPartPage.js deleted file mode 100644 index 4f39148..0000000 --- a/web/src/pages/NewPartPage/NewPartPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import PartsLayout from 'src/layouts/PartsLayout' -import NewPart from 'src/components/NewPart' - -const NewPartPage = () => { - return ( - - - - ) -} - -export default NewPartPage diff --git a/web/src/pages/NewPostPage/NewPostPage.js b/web/src/pages/NewPostPage/NewPostPage.js deleted file mode 100644 index 7a41350..0000000 --- a/web/src/pages/NewPostPage/NewPostPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import PostsLayout from 'src/layouts/PostsLayout' -import NewPost from 'src/components/NewPost' - -const NewPostPage = () => { - return ( - - - - ) -} - -export default NewPostPage diff --git a/web/src/pages/NewUserPage/NewUserPage.js b/web/src/pages/NewUserPage/NewUserPage.js deleted file mode 100644 index 0368b02..0000000 --- a/web/src/pages/NewUserPage/NewUserPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import NewUser from 'src/components/NewUser' - -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 b9bcd31..0000000 --- a/web/src/pages/PartPage/PartPage.js +++ /dev/null @@ -1,15 +0,0 @@ -import PartsLayout from 'src/layouts/PartsLayout' -import MainLayout from 'src/layouts/MainLayout' -import PartCell from 'src/components/PartCell' - -const PartPage = ({ id }) => { - return ( - - - - - - ) -} - -export default PartPage diff --git a/web/src/pages/PartsPage/PartsPage.js b/web/src/pages/PartsPage/PartsPage.js deleted file mode 100644 index ae36f11..0000000 --- a/web/src/pages/PartsPage/PartsPage.js +++ /dev/null @@ -1,15 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import PartsLayout from 'src/layouts/PartsLayout' -import PartsCell from 'src/components/PartsCell' - -const PartsPage = () => { - return ( - - - - - - ) -} - -export default PartsPage diff --git a/web/src/pages/PostPage/PostPage.js b/web/src/pages/PostPage/PostPage.js deleted file mode 100644 index 8b9eec3..0000000 --- a/web/src/pages/PostPage/PostPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import PostsLayout from 'src/layouts/PostsLayout' -import PostCell from 'src/components/PostCell' - -const PostPage = ({ id }) => { - return ( - - - - ) -} - -export default PostPage diff --git a/web/src/pages/PostsPage/PostsPage.js b/web/src/pages/PostsPage/PostsPage.js deleted file mode 100644 index b5392dc..0000000 --- a/web/src/pages/PostsPage/PostsPage.js +++ /dev/null @@ -1,15 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import PostsLayout from 'src/layouts/PostsLayout' -import PostsCell from 'src/components/PostsCell' - -const PostsPage = () => { - return ( - - - - - - ) -} - -export default PostsPage diff --git a/web/src/pages/UserPage/UserPage.js b/web/src/pages/UserPage/UserPage.js deleted file mode 100644 index cf81dc9..0000000 --- a/web/src/pages/UserPage/UserPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import UserCell from 'src/components/UserCell' - -const UserPage = ({ id }) => { - return ( - - - - ) -} - -export default UserPage diff --git a/web/src/pages/UsersPage/UsersPage.js b/web/src/pages/UsersPage/UsersPage.js deleted file mode 100644 index 7331b05..0000000 --- a/web/src/pages/UsersPage/UsersPage.js +++ /dev/null @@ -1,12 +0,0 @@ -import MainLayout from 'src/layouts/MainLayout' -import UsersCell from 'src/components/UsersCell' - -const UsersPage = () => { - return ( - - - - ) -} - -export default UsersPage