import { format, parse } from "date-format-parse"; import ArtCardStyle from "./tootCard.style"; import { compile } from "html-to-text"; function SkillCard({ content, created_at, url, image }) { const contents = [content]; const options = { wordwrap: 10, limits: { ellipsis: " ...", maxInputLength: "200", }, longWordSplit: { forceWrapOnLimit: true, wrapCharacters: ["-", "/"], }, }; const compiledConvert = compile(options); const texts = contents.map(compiledConvert); return (
{content && (
{image && (
)}
"{texts.join("\n")}"
# {format(created_at, "DD MMM YYYY")}
)}
); } export default SkillCard;