diff --git a/components/NewsCard.tsx b/components/NewsCard.tsx index 873af2d9..140de65f 100644 --- a/components/NewsCard.tsx +++ b/components/NewsCard.tsx @@ -1,14 +1,15 @@ -import React from "react"; +import { prependOnceListener } from "node:process"; +import React, { Children, ReactElement } from "react"; import styles from './newscard.module.css' interface NewsCardProps { date: Date; author: string; - content: string; + children: ReactElement; } -const NewsCard: React.FC = ({date,author,content}) => { +const NewsCard: React.FC = ({date,author,children}) => { const options = {year:'numeric', month:'long',day:'numeric'}; return( @@ -23,9 +24,7 @@ const NewsCard: React.FC = ({date,author,content}) => { {author}
-

- {content} -

+ {children}
)