type SingleNewProps = {
	date: string;
	title: string;
	labels: string[];
	content: string;
};

const SingleNew = (props: SingleNewProps) => {
	return (
		<div className="row">
			<div className="col">
				<p className="news--wrapper--date">
					Updated at{" "}
					<span
						dangerouslySetInnerHTML={{
							__html: props.date,
						}}
					></span>
				</p>
				<p className="news--wrapper--title">
					<span
						dangerouslySetInnerHTML={{
							__html: props.title,
						}}
					></span>
				</p>
				<p className="news--wrapper--labels">
					{props.labels.map((cat) => {
						if (cat === "Uncategorized") return null;
						return (
							<span key={cat} className={cat}>
								{cat}
							</span>
						);
					})}
				</p>
				<p className="news--wrapper--content">
					<span
						dangerouslySetInnerHTML={{
							__html: props.content,
						}}
					></span>
				</p>
			</div>
		</div>
	);
};
export default SingleNew;
