move link in news item
This commit is contained in:
@ -8,27 +8,28 @@ export const NewsItem = ({ news }: { news: NewsFragment }) => {
|
||||
const featuredImage: any = news.featuredImage;
|
||||
|
||||
return (
|
||||
<Link href={`/aktuelt/${news.slug}`}>
|
||||
<li className={`${styles.newsItem} linkItem`}>
|
||||
<div className={styles.image}>
|
||||
{featuredImage && (
|
||||
<Image
|
||||
src={featuredImage.url}
|
||||
alt={featuredImage.alt}
|
||||
width={featuredImage.width}
|
||||
height={featuredImage.height}
|
||||
sizes="20vw"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.text}>
|
||||
<p className={styles.date}>
|
||||
{formatDate(news.firstPublishedAt, commonDateFormat)}
|
||||
</p>
|
||||
<h2 className={styles.title}>{news.title}</h2>
|
||||
<p className={styles.lead}>{news.excerpt}</p>
|
||||
</div>
|
||||
</li>
|
||||
</Link>
|
||||
<li className={`${styles.newsItem} linkItem`}>
|
||||
<div className={styles.image}>
|
||||
{featuredImage && (
|
||||
<Image
|
||||
src={featuredImage.url}
|
||||
alt={featuredImage.alt}
|
||||
width={featuredImage.width}
|
||||
height={featuredImage.height}
|
||||
sizes="20vw"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.text}>
|
||||
<p className={styles.date}>
|
||||
{formatDate(news.firstPublishedAt, commonDateFormat)}
|
||||
</p>
|
||||
<h2 className={styles.title}>{news.title}</h2>
|
||||
<p className={styles.lead}>{news.excerpt}</p>
|
||||
</div>
|
||||
<Link href={`/aktuelt/${news.slug}`} className="hiddenLink">
|
||||
Les artikkelen: {news.title}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user