Skip to content

Commit

Permalink
Link added to header for cards
Browse files Browse the repository at this point in the history
  • Loading branch information
haslo committed Sep 3, 2024
1 parent 91b34c2 commit 04c3fef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NewsPostCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export default function NewsPostCard({newsPost}) {
<Avatar variant="rounded" alt={newsPost.type.channelDescription} src={newsPost.type.icon.url}/>
</a>
}
title={newsPost.title}
title={
<a href={newsPost.originalUrl}>
{newsPost.title}
</a>
}
subheader={format(new Date(newsPost.publicationDate), 'yyyy-MM-dd')}
/>
<CardActionArea href={newsPost.originalUrl} target='_blank' className={newsPost.isVideo ? 'video_card' : (newsPost.isAudio ? 'audio_card' : 'plain_card')}>
Expand Down
5 changes: 5 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

.MuiCardHeader-content a {
color: inherit;
text-decoration: none;
}

0 comments on commit 04c3fef

Please sign in to comment.