import { useNavigate } from 'react-router-dom'; import type { Article } from '../types/Article.ts'; import { Card, Typography } from '@mui/material'; interface Props { article: Article; } export default function ArticleCard(props: Props) { const navigate = useNavigate(); // TODO: Retrieve author id => author name return ( { navigate(`/article/${props.article.slug}`) }} >
{props.article.name}
By {props.article.author_id}
{props.article.summary}
); };