Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 31 additions & 14 deletions frontend/src/modules/article-list/components/ArticleImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,37 @@ import { CardMedia } from '@mui/material'
export default function Image({ url }: { url?: string | null | undefined }) {
return (
<CardMedia
component="img"
loading="lazy"
sx={{
width: {
xs: '100%',
md: 450,
},
height: {
xs: 300,
md: 'auto',
},
}}
image={!url || !url.length ? '/placeholder.webp' : url}
alt={url || ''}
component="img"
loading="lazy"
sx={{
width: {
xs: '100%',
md: 450,
},
height: {
xs: 300,
md: 'auto',
},
minHeight: {
xs: 300,
md: 'auto',
},
maxHeight: {
xs: 300,
md: 'auto',
},
minWidth: {
xs: '100%',
md: 450
},
maxWidth: {
xs: '100%',
md: 450,
},
objectFit: 'cover',
}}
image={!url || !url.length ? '/placeholder.webp' : url}
alt={url || ''}
/>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function ArticleListItem({ article }: { article: GetArticlesQuery
</Box>
<Link to={`/article/${article.id}`}>
<Box sx={{ display: 'flex', alignItems: 'center', p: 2 }}>
<Typography variant="h6">{t('readMore')}</Typography>
<Typography variant="body1">{t('readMore')}</Typography>
</Box>
</Link>
</CardActions>
Expand Down