diff --git a/source/src/components/PostCard.tsx b/source/src/components/PostCard.tsx index 717d146..3206c66 100644 --- a/source/src/components/PostCard.tsx +++ b/source/src/components/PostCard.tsx @@ -1,5 +1,5 @@ import styled from "styled-components" -import { useNavigate } from "react-router-dom" +import { Link } from "react-router-dom" import { PostData } from "../../types/types" @@ -55,41 +55,42 @@ interface Props { const PostCard = (props: Props) => { const { postData } = props - const navigate = useNavigate() return ( - navigate(process.env.PUBLIC_URL + postData.url)} - > - - {postData?.title || "No title"} - {/* show (series for regex matching "/series/") */} - {/\/series\/[^/]*$/.test(postData.url) && " (series)"} - + + + + {postData?.title || "No title"} + {/* show (series for regex matching "/series/") */} + {/\/series\/[^/]*$/.test(postData.url) && " (series)"} + -
+
- - - {postData.tags && - postData.tags.map((tag) => { - return - })} - -
- -     - {postData?.date || "Unknown date"} -      - -     - {postData?.readTime ? postData.readTime + " read" : "unknown length"} -      - -     - {postData?.wordCount ? postData.wordCount + " words" : "unknown words"} -
-
+ + + {postData.tags && + postData.tags.map((tag) => { + return + })} + +
+ +     + {postData?.date || "Unknown date"} +      + +     + {postData?.readTime ? postData.readTime + " read" : "unknown length"} +      + +     + {postData?.wordCount + ? postData.wordCount + " words" + : "unknown words"} +
+
+ ) }