From 3daba8594922a5b19cafaf20a0d8f7a1e3736a4f Mon Sep 17 00:00:00 2001 From: Rob Cameron Date: Tue, 8 Feb 2022 15:13:34 -0800 Subject: [PATCH] Fix a couple name change leftoveres --- web/src/components/Article/Article.js | 6 +++--- web/src/components/ArticleCell/ArticleCell.js | 2 +- .../components/ArticlesCell/ArticlesCell.js | 7 +++---- web/src/layouts/BlogLayout/BlogLayout.js | 19 ++++++++++++------- web/src/pages/ArticlePage/ArticlePage.js | 4 ++-- web/src/pages/HomePage/HomePage.js | 4 ++-- 6 files changed, 23 insertions(+), 19 deletions(-) diff --git a/web/src/components/Article/Article.js b/web/src/components/Article/Article.js index 102b7b1..05205df 100644 --- a/web/src/components/Article/Article.js +++ b/web/src/components/Article/Article.js @@ -1,14 +1,14 @@ import { Link, routes } from '@redwoodjs/router' -const Article = ({ post }) => { +const Article = ({ article }) => { return (

- {post.title} + {article.title}

-
{post.body}
+
{article.body}
) } diff --git a/web/src/components/ArticleCell/ArticleCell.js b/web/src/components/ArticleCell/ArticleCell.js index 2ab37e6..fd96e33 100644 --- a/web/src/components/ArticleCell/ArticleCell.js +++ b/web/src/components/ArticleCell/ArticleCell.js @@ -1,4 +1,4 @@ -import BlogPost from 'src/components/BlogPost' +import Article from 'src/components/Article' export const QUERY = gql` query ArticleQuery($id: Int!) { diff --git a/web/src/components/ArticlesCell/ArticlesCell.js b/web/src/components/ArticlesCell/ArticlesCell.js index f0f0087..9b11d2d 100644 --- a/web/src/components/ArticlesCell/ArticlesCell.js +++ b/web/src/components/ArticlesCell/ArticlesCell.js @@ -1,5 +1,4 @@ -import { Link, routes } from '@redwoodjs/router' -import BlogPost from 'src/components/BlogPost' +import Article from 'src/components/Article' export const QUERY = gql` query BlogPostsQuery { @@ -18,11 +17,11 @@ export const Empty = () =>
Empty
export const Failure = ({ error }) =>
Error: {error.message}
-export const Success = ({ posts }) => { +export const Success = ({ articles }) => { return (
{articles.map((article) => ( -
+
))}
) diff --git a/web/src/layouts/BlogLayout/BlogLayout.js b/web/src/layouts/BlogLayout/BlogLayout.js index 66dcff8..f2ab979 100644 --- a/web/src/layouts/BlogLayout/BlogLayout.js +++ b/web/src/layouts/BlogLayout/BlogLayout.js @@ -34,13 +34,18 @@ const BlogLayout = ({ children }) => {
  • - - {isAuthenticated ? 'Log Out' : 'Log In'} - + {isAuthenticated ? ( +
    + Logged in as {currentUser.email}{' '} + +
    + ) : ( + + Login + + )}
  • {isAuthenticated && ( diff --git a/web/src/pages/ArticlePage/ArticlePage.js b/web/src/pages/ArticlePage/ArticlePage.js index d0fd466..1c1624d 100644 --- a/web/src/pages/ArticlePage/ArticlePage.js +++ b/web/src/pages/ArticlePage/ArticlePage.js @@ -1,12 +1,12 @@ import { MetaTags } from '@redwoodjs/web' -import BlogPostCell from 'src/components/BlogPostCell' +import ArticleCell from 'src/components/ArticleCell' const ArticlePage = ({ id }) => { return ( <> - + ) } diff --git a/web/src/pages/HomePage/HomePage.js b/web/src/pages/HomePage/HomePage.js index 8c58f07..418ec64 100644 --- a/web/src/pages/HomePage/HomePage.js +++ b/web/src/pages/HomePage/HomePage.js @@ -1,11 +1,11 @@ import { MetaTags } from '@redwoodjs/web' -import BlogPostsCell from 'src/components/BlogPostsCell' +import ArticlesCell from 'src/components/ArticlesCell' const HomePage = () => { return ( <> - + ) }