import PostMeta from '@components/PostMeta/PostMeta'; import { t } from '@lingui/macro'; import { ArticlePreview } from '@ts/types/articles'; import Link from 'next/link'; import ArrowRightIcon from '@assets/images/icon-arrow-right.svg'; import styles from './PostPreview.module.scss'; import Image from 'next/image'; type TitleLevel = 2 | 3 | 4 | 5 | 6; const PostPreview = ({ post, titleLevel, }: { post: ArticlePreview; titleLevel: TitleLevel; }) => { const TitleTag = `h${titleLevel}` as keyof JSX.IntrinsicElements; return (
{post.featuredImage && (
{post.featuredImage.altText}
)}
{post.title}
); }; export default PostPreview;