Implemented i18n and translated RatingCard
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { Card, CardActionArea, CardContent, Paper, Rating, Typography } from "@mui/material";
|
||||
import RatingType from "../../components/Rating";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export default function RatingCard(ratingType: RatingType) {
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleClick = () => {
|
||||
console.log(`Clicked on rating with id: ${ratingType.id}`);
|
||||
}
|
||||
@@ -13,7 +16,7 @@ export default function RatingCard(ratingType: RatingType) {
|
||||
<CardActionArea onClick={handleClick}>
|
||||
<CardContent>
|
||||
<Typography gutterBottom variant="h5" component="div">
|
||||
Rating vom: {ratingType.date}
|
||||
{t('ratingFrom')} {ratingType.date}
|
||||
</Typography>
|
||||
<Rating name="half-rating" readOnly defaultValue={ratingType.rating} precision={0.5} />
|
||||
<Typography variant="body2" sx={{ color: 'text.secondary' }} className="item-description">
|
||||
|
||||
Reference in New Issue
Block a user