import * as React from 'react'; import Avatar from '@mui/material/Avatar'; import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; import Rating from '@mui/material/Rating'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { dayjs } from '@/lib/dayjs'; import type { Review } from './types'; export interface ReviewCardProps { review: Review; } export function ReviewCard({ review }: ReviewCardProps): React.JSX.Element { return ( {review.title} •} spacing={2} sx={{ alignItems: 'center', flexWrap: 'wrap' }} > {review.rating}/5 {review.author.name} {dayjs(review.createdAt).fromNow()} {review.comment} ); }