removed tag image from news feed posts and fixed image styling

This commit is contained in:
Toni Lyttinen
2021-03-31 21:44:58 +00:00
parent 6707f888c6
commit 7b43114879
+14 -8
View File
@@ -12,7 +12,6 @@ interface FeedPageViewProps {
}
const StyledTextSection = styled(TextSection)`
margin: auto;
align-items: center;
& > h1 {
@@ -21,6 +20,10 @@ const StyledTextSection = styled(TextSection)`
color: ${colors.orange1};
}
}
& > div {
margin: auto;
}
`;
const Content = styled(MarkdownStyles)`
@@ -36,13 +39,16 @@ const FeedPageView: React.FC<FeedPageViewProps> = ({ post }) => {
<p>
{post.description_fi}
</p>
<Image
src={post.image || post.tags[0].icon}
alt={post.title_fi}
layout="responsive"
width={0}
height={0}
/>
{post.image && (
<Image
src={post.image}
alt={post.title_fi}
objectFit="scale-down"
layout="responsive"
width={16}
height={9}
/>
)}
</h1>
<div>
<Content source={post.content_fi} escapeHtml={false} />