11import { CustomLink } from "../customLink" ;
22import ArticleAuthor from "./articleAuthor" ;
3+ import ArticleDate from "./articleDate" ;
34
45export type ArticleProps = {
56 title : string ;
@@ -8,6 +9,7 @@ export type ArticleProps = {
89 authorName : string | null ;
910 authorPosition : string | null ;
1011 authorImage : string | null ;
12+ publishedDate ?: string ;
1113} ;
1214
1315export type ArticleCardProps = {
@@ -22,6 +24,7 @@ const ArticleCard = ({ data }: ArticleCardProps) => {
2224 authorName,
2325 authorPosition,
2426 url,
27+ publishedDate,
2528 } : ArticleProps = data ;
2629 return (
2730 < CustomLink href = { url ?? "" } className = "unstyled no-underline" >
@@ -31,6 +34,7 @@ const ArticleCard = ({ data }: ArticleCardProps) => {
3134 userImage = { authorImage }
3235 userName = { authorName }
3336 userPosition = { authorPosition }
37+ publishedDate = { publishedDate }
3438 />
3539 </ CustomLink >
3640 ) ;
@@ -42,16 +46,20 @@ const ArticleCardContent = ({
4246 userName,
4347 userImage,
4448 userPosition,
49+ publishedDate,
4550} ) => {
4651 return (
4752 < div className = "size-full bg-white" >
4853 < div >
4954 < h2 className = "my-1" > { title } </ h2 >
50- < ArticleAuthor
51- name = { userName }
52- position = { userPosition }
53- image = { userImage }
54- />
55+ < div className = "flex flex-row items-center gap-2 py-1" >
56+ < ArticleAuthor
57+ name = { userName }
58+ position = { userPosition }
59+ image = { userImage }
60+ />
61+ < ArticleDate publishedDate = { publishedDate } />
62+ </ div >
5563 < div className = "font-normal prose-p:mt-0" > { body } </ div >
5664 </ div >
5765 </ div >
0 commit comments