Skip to content

Commit ec92ff9

Browse files
committed
add alt tags and fix more legacy image imports
1 parent 0073e8d commit ec92ff9

File tree

7 files changed

+21
-12
lines changed

7 files changed

+21
-12
lines changed

components/containers/Member.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ export default function Member({
99
about,
1010
linkedIn,
1111
portfolio,
12-
customClass,
1312
}) {
1413
return (
1514
<div className={styles.card}>
1615
{image && (
1716
<div className={styles.card__image}>
18-
<Image src={image} alt={name} className={styles.img} fill />
17+
<Image src={image} alt={name} fill />
1918
</div>
2019
)}
2120

components/layout/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import Image from 'next/image';
12
import footerStyles from '@/styles/Footer.module.scss';
23
import { linksNav, linksSocial } from '@/utils/links';
34
import NewsletterSubscribe from '@/components/mailchimp/NewsletterSubscribe';
4-
import Image from 'next/legacy/image';
55
import Container from '@/components/containers/Container';
66

77
export default function Footer() {

components/layout/Hero.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from 'react';
2-
import Image from 'next/legacy/image';
2+
import Image from 'next/image';
33
import Nav from '@/components/layout/Nav';
44
import Container from '@/components/containers/Container';
55
import styles from '@/styles/Hero.module.scss';
@@ -29,9 +29,7 @@ export default function Hero({
2929
src={imgBg}
3030
alt={imgAlt}
3131
className={styles.imageBg}
32-
layout='fill'
33-
objectFit='cover'
34-
objectPosition='center'
32+
fill
3533
priority
3634
/>
3735
<Container customClass={styles.header__content}>

components/layout/Nav.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useState, useEffect, useRef } from 'react';
22
import { useRouter } from 'next/router';
3+
import Link from 'next/link';
34
import Container from '@/components/containers/Container';
45
import styles from '@/styles/Nav.module.scss';
56
import { linksNav } from '@/utils/links';
@@ -54,14 +55,14 @@ export default function Nav() {
5455
<Container>
5556
<div ref={containerRef}>
5657
<nav className={styles.nav}>
57-
<a href='/' passhref='true'>
58+
<Link href='/'>
5859
<img
5960
className={styles.nav__logo}
6061
src='/images/svg/logo.svg'
6162
alt='Logo'
6263
title='Go to the Homepage'
6364
/>
64-
</a>
65+
</Link>
6566
<ul
6667
className={`${styles.nav__links} ${active ? styles.active : ''}`}
6768
>

components/mailchimp/NewsletterForm.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createRef, useState } from 'react';
2-
import Image from 'next/legacy/image';
2+
import Image from 'next/image';
33
import { decode } from 'html-entities';
44
import ReCAPTCHA from 'react-google-recaptcha';
55
import Container from '@/components/containers/Container';
@@ -124,7 +124,6 @@ const NewsletterForm = ({ status, message, onValidated }) => {
124124
height={18}
125125
width={18}
126126
alt='Right Chevron SVG'
127-
className={newsletterStyles.newsletter__right_chevron_image}
128127
/>
129128
</span>
130129
</h2>

pages/about.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Wrapper from '@/components/containers/Wrapper';
1212
import Container from '@/components/containers/Container';
1313
import Row from '@/components/containers/Row';
1414
import Member from '@/components/containers/Member';
15-
import { whoWeAre } from '../utils/about';
15+
import { whoWeAre } from '@/utils/about';
1616

1717
export default function AboutUs() {
1818
return (
@@ -34,6 +34,7 @@ export default function AboutUs() {
3434
}
3535
rowOrder='row'
3636
image='/images/svg/square-brackets.svg'
37+
altTag='Square Brackets'
3738
color={primary}
3839
bgColor={primaryAccent}
3940
customInnerClass='our-background'
@@ -74,6 +75,7 @@ export default function AboutUs() {
7475
}
7576
rowOrder='row-reverse'
7677
image='/images/svg/open-angle-bracket.svg'
78+
altTag='Open angle bracket'
7779
color={primary}
7880
bgColor={white}
7981
customInnerClass='our-process'
@@ -95,6 +97,7 @@ export default function AboutUs() {
9597
</div>
9698
}
9799
image='/images/svg/close-angle-bracket.svg'
100+
altTag='close-angle-bracket'
98101
color={primary}
99102
bgColor={white}
100103
customInnerClass='our-process'
@@ -138,6 +141,7 @@ export default function AboutUs() {
138141
}
139142
rowOrder='row-reverse'
140143
image='/images/svg/semi-colon.svg'
144+
altTag='Semi-colon'
141145
color={primary}
142146
bgColor={white}
143147
customInnerClass='our-purpose'
@@ -148,6 +152,7 @@ export default function AboutUs() {
148152
title='Wanna learn more?'
149153
content={''}
150154
image='/images/svg/close-curly-bracket.svg'
155+
altTag='Close curly bracket'
151156
color={primary}
152157
bgColor={lightBgColor}
153158
customInnerClass='wanna-learn-more'
@@ -216,6 +221,7 @@ export default function AboutUs() {
216221
}
217222
rowOrder='row-reverse'
218223
image='/images/svg/slash.svg'
224+
altTag='Slash'
219225
color={primary}
220226
bgColor={white}
221227
customInnerClass='get-started'
@@ -252,6 +258,7 @@ export default function AboutUs() {
252258
title='Still got questions?'
253259
content='Feel free to contact us.'
254260
image='/images/svg/hashtag.svg'
261+
altTag='Hashtag'
255262
color={primary}
256263
bgColor={white}
257264
customInnerClass='questions'

styles/Hero.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@
4343
}
4444
}
4545
}
46+
47+
.imageBg {
48+
object-fit: cover;
49+
object-position: center;
50+
}

0 commit comments

Comments
 (0)