Use next/image for all <img> tags

This commit is contained in:
Aarni Halinen
2021-01-16 18:21:42 +02:00
parent e0ff72ce7c
commit 6d5c0bebe9
9 changed files with 100 additions and 57 deletions
+35 -16
View File
@@ -1,4 +1,5 @@
import React from "react";
import Image from "next/image";
import styled from "styled-components";
import {
Card,
@@ -45,13 +46,9 @@ const SponsorReel = styled.div`
& > * {
margin: 1rem;
min-width: 200px;
}
}
img {
width: 200px;
object-fit: cover;
}
a {
color: ${colors.blue1};
text-decoration: underline;
@@ -122,17 +119,39 @@ const FrontPageView: React.FC<FrontPageViewProps> = ({ events, feed }) => (
<h6>Yhteistyössä:</h6>
<SponsorReel>
<div>
<Link to="https://new.abb.com/fi/uralle"><img src={ABB} /></Link>
<Link to="https://www.capgemini.com/"><img src={Capgemini} /></Link>
<Link to="https://www.caruna.fi/tietoa-meista/tyonhakijalle/tyonantajalupaus"><img src={Caruna} /></Link>
<Link to="https://www.eaton.com/us/en-us.html"><img src={Eaton} /></Link>
<Link to="https://www.ensto.com/fi"><img src={Ensto} /></Link>
<Link to="https://www.esett.com/"><img src={eSett} /></Link>
<Link to="https://www.fennovoima.fi/"><img src={Fennovoima} /></Link>
<Link to="https://www.fingrid.fi/"><img src={Fingrid} /></Link>
<Link to="https://www.nrcgroup.fi/"><img src={NRCGroup} /></Link>
<Link to="https://www.okmetic.com/fi/"><img src={Okmetic} /></Link>
<Link to="https://www.sogeti.com/"><img src={Sogeti} /></Link>
<Link to="https://new.abb.com/fi/uralle">
<Image src={ABB} alt="ABB" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.capgemini.com/">
<Image src={Capgemini} alt="Capgemini" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.caruna.fi/tietoa-meista/tyonhakijalle/tyonantajalupaus">
<Image src={Caruna} alt="Caruna" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.eaton.com/us/en-us.html">
<Image src={Eaton} alt="Eaton" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.ensto.com/fi">
<Image src={Ensto} alt="Ensto" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.esett.com/">
<Image src={eSett} alt="eSett" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.fennovoima.fi/">
<Image src={Fennovoima} alt="Fennovoima" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.fingrid.fi/">
<Image src={Fingrid} alt="Fingrid" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.nrcgroup.fi/">
<Image src={NRCGroup} alt="NRCGroup" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.okmetic.com/fi/">
<Image src={Okmetic} alt="Okmetic" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
<Link to="https://www.sogeti.com/">
<Image src={Sogeti} alt="Sogeti" layout="responsive" width={200} height={100} objectFit="contain" />
</Link>
</div>
<Link to="/yritysyhteistyo">Haluatko kuulla lisää yhteistyöstä kanssamme?</Link>
</SponsorReel>