diff --git a/components/toolbox/AuthorCard.js b/components/toolbox/AuthorCard.js index 62f94809..6c9636e4 100644 --- a/components/toolbox/AuthorCard.js +++ b/components/toolbox/AuthorCard.js @@ -1,6 +1,7 @@ import Image from 'next/image' +import Link from 'next/link' +export default function AuthorCard({ author = {},title, avatar='' }) { -export default function AuthorCard({ author = {}, avatar='' }) { let attributes = {}; if (author.data && author.data.attributes) { //displayName firstName lastName avatar @@ -17,12 +18,12 @@ export default function AuthorCard({ author = {}, avatar='' }) { return ( <> -
- -

{attributes.title ? attributes.title : "Posted by"}

+
+ + {/*

{title?title:attributes.title ? attributes.title : "Posted by"}

*/}
-
+
{ (pic) &&

Editor

+ {title?

{title}

:null}
-
+
) diff --git a/components/v4/layout/ToolLargeCardRow.js b/components/v4/layout/ToolLargeCardRow.js index 2932f747..f107cdda 100644 --- a/components/v4/layout/ToolLargeCardRow.js +++ b/components/v4/layout/ToolLargeCardRow.js @@ -28,7 +28,6 @@ const ToolLargeCardRow = ({ tools , showTitle}) => {
:''}
{tools.map((tool, index) => { - console.log(tool) return (
diff --git a/pages/toolbox/[slug].js b/pages/toolbox/[slug].js index d139ab61..e6e6b57c 100644 --- a/pages/toolbox/[slug].js +++ b/pages/toolbox/[slug].js @@ -41,6 +41,7 @@ import Link from "next/link"; import Button from "@/components/Primitives/Button"; import { TOTAL_STATIC_POSTS } from "@/lib/constants"; import ToolLargeCardRow from "@/components/v4/layout/ToolLargeCardRow"; +import AuthorCard from "@/components/toolbox/AuthorCard"; const ToolContent = ({ post, gallery, relatedPosts, popularTags }) => { const { user } = useUser(); @@ -210,6 +211,25 @@ const ToolContent = ({ post, gallery, relatedPosts, popularTags }) => { : "https://s3-us-west-1.amazonaws.com/tinify-bucket/%2Fprototypr%2Ftemp%2F1595435549331-1595435549330.png" } />:''} + {post?.attributes?.author && ( + <> +

{post?.attributes?.creator?'Contributors':'Posted by'}

+
+ + {post.attributes?.creator ?
+ +
:null} +
+ + )}
@@ -224,11 +244,11 @@ const ToolContent = ({ post, gallery, relatedPosts, popularTags }) => {
- + {/* */} {relatedPosts?.length ?
- +

Related tools diff --git a/styles/toolStyles.css b/styles/toolStyles.css index 832cc716..bd1a7189 100644 --- a/styles/toolStyles.css +++ b/styles/toolStyles.css @@ -6,7 +6,7 @@ } .popup-modal-content ul li { margin-top: 0.75rem; - color: #4a5568; + /* color: #4a5568; */ } .popup-modal-content ol { list-style-type: decimal;