Skip to content

Commit fc01905

Browse files
authored
Merge pull request #27 from mateonunez/feat/upgrade-nextjs
feat(*): upgrade Next.js to v13
2 parents c8971b2 + 70d2deb commit fc01905

File tree

16 files changed

+400
-412
lines changed

16 files changed

+400
-412
lines changed

articles/consuming-spotify-apis.mdx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -375,22 +375,22 @@ const Player = () => {
375375
<>
376376
<div className={s.root}>
377377
<div className={s.inner}>
378-
<Link href={url} passHref>
379-
<a
380-
target={listening?.isPlaying ? '_blank' : '_self'}
381-
aria-label="Mateo Nunez on Spotify"
382-
rel="noopener noreferer noreferrer"
383-
title="Mateo Nunez on Spotify"
384-
href={url}>
385-
{listening?.isPlaying ? (
386-
<div className="w-auto h-auto">
387-
{/* eslint-disable-next-line @next/next/no-img-element */}
388-
<img width="40" height="40" src={listening?.thumbnail} alt={listening?.album} />
389-
</div>
390-
) : (
391-
<Spotify className="w-10 h-10" color={'#1ED760'} />
392-
)}
393-
</a>
378+
<Link
379+
href={url}
380+
passHref
381+
target={listening?.isPlaying ? '_blank' : '_self'}
382+
aria-label="Mateo Nunez on Spotify"
383+
rel="noopener noreferer noreferrer"
384+
title="Mateo Nunez on Spotify"
385+
href={url}>
386+
{listening?.isPlaying ? (
387+
<div className="w-auto h-auto">
388+
{/* eslint-disable-next-line @next/next/no-img-element */}
389+
<img width="40" height="40" src={listening?.thumbnail} alt={listening?.album} />
390+
</div>
391+
) : (
392+
<Spotify className="w-10 h-10" color={'#1ED760'} />
393+
)}
394394
</Link>
395395

396396
<div className={s.details}>
@@ -402,14 +402,14 @@ const Player = () => {
402402
<p className={s.artist}>{listening?.isPlaying ? listening.artist : 'Spotify'}</p>
403403
</div>
404404
<div className="flex flex-row">
405-
<Link href="/spotify" passHref>
406-
<a
407-
target={listening?.isPlaying ? '_blank' : '_self'}
408-
aria-label="Mateo Nunez on Spotify"
409-
rel="noopener noreferer noreferrer"
410-
title="Mateo Nunez on Spotify">
411-
<ChevronUp className="w-4 h-4 rotate-90" />
412-
</a>
405+
<Link
406+
href="/spotify"
407+
passHref
408+
target={listening?.isPlaying ? '_blank' : '_self'}
409+
aria-label="Mateo Nunez on Spotify"
410+
rel="noopener noreferer noreferrer"
411+
title="Mateo Nunez on Spotify">
412+
<ChevronUp className="w-4 h-4 rotate-90" />
413413
</Link>
414414
</div>
415415
</div>

components/about/about.jsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,13 @@ const About = ({ ...props }) => {
105105
<span className={s.bioYear}>2017 to date</span>
106106
<span className={s.bioText}>
107107
Works on{' '}
108-
<Link href="https://sabicom.com" passHref>
109-
<a
110-
href="http://sabicom.com"
111-
alt="Sabicom SRL"
112-
target="_blank"
113-
rel="noreferrer">
114-
Sabicom SRL
115-
</a>
108+
<Link
109+
href="https://sabicom.com"
110+
passHref
111+
alt="Sabicom SRL"
112+
target="_blank"
113+
rel="noreferrer">
114+
Sabicom SRL
116115
</Link>{' '}
117116
as a Developer. In these years I learned how to work with different
118117
technologies. I&apos;m currently the <i>Team Leader</i>.

components/articles/mdx/image/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ export default function MDXImage({
3434
return (
3535
<div className={s.root}>
3636
{href ? (
37-
<Link href={href} fancy={false} passHref>
38-
<a href={href} alt={alt} aria-label={alt} title={alt} target={target}>
39-
{ImageWrapper}
40-
</a>
37+
<Link
38+
href={href}
39+
fancy={false}
40+
passHref
41+
alt={alt}
42+
aria-label={alt}
43+
title={alt}
44+
target={target}>
45+
{ImageWrapper}
4146
</Link>
4247
) : (
4348
<>{ImageWrapper}</>

components/articles/mdx/link/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ export default function MDXLink({ children, ...rest }) {
1212

1313
return (
1414
<>
15-
<Link href={href}>
16-
<a href={href} alt={title} title={title} target="_blank" rel="noreferrer">
17-
{children}
18-
</a>
15+
<Link href={href} alt={title} title={title} target="_blank" rel="noreferrer">
16+
{children}
1917
</Link>
2018
</>
2119
);

components/articles/meta/index.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ export default function ArticleMeta({ date, author, readingTime, tags = [] }) {
2424
<div className={s.tagList}>
2525
{tags.map((tag, index) => (
2626
<span className={index !== tags.length - 1 ? 'mr-2' : ''} key={tag}>
27-
<Link href={`/blog/tags/${kebapCase(tag)}`} as={`/blog/tags/${kebapCase(tag)}`}>
28-
<a className={s.tag} title={tag}>
29-
#{tag}
30-
</a>
27+
<Link
28+
href={`/blog/tags/${kebapCase(tag)}`}
29+
as={`/blog/tags/${kebapCase(tag)}`}
30+
className={s.tag}
31+
title={tag}>
32+
#{tag}
3133
</Link>
3234
</span>
3335
))}
@@ -40,10 +42,12 @@ export default function ArticleMeta({ date, author, readingTime, tags = [] }) {
4042
<span className="ml-1 text-white">By: </span>
4143

4244
{/* {author} */}
43-
<Link href="/blog/author/[author]" as={`/blog/author/${author.name}`}>
44-
<a className={s.author} title={author.name}>
45-
{author.name}
46-
</a>
45+
<Link
46+
href="/blog/author/[author]"
47+
as={`/blog/author/${author.name}`}
48+
className={s.author}
49+
title={author.name}>
50+
{author.name}
4751
</Link>
4852
</div>
4953
</div>

components/articles/preview/index.js

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,27 @@ export default function ArticlePreview({
3838
</div>
3939

4040
{/* Body */}
41-
<Link href="/blog/[slug]" as={`/blog/${slug}`}>
42-
<a rel="canonical" href={`/blog/${slug}`} title={title}>
43-
<div className={s.body}>
44-
{/* Image */}
45-
<div className={s.imagePreview}>
46-
<Image
47-
src={image}
48-
alt={title}
49-
width={1280}
50-
height={720}
51-
layout="responsive"
52-
className={s.image}
53-
priority
54-
/>
55-
</div>
41+
<Link as={`/blog/${slug}`} rel="canonical" href={`/blog/${slug}`} title={title}>
42+
<div className={s.body}>
43+
{/* Image */}
44+
<div className={s.imagePreview}>
45+
<Image
46+
src={image}
47+
alt={title}
48+
width={1280}
49+
height={720}
50+
layout="responsive"
51+
className={s.image}
52+
priority
53+
/>
54+
</div>
5655

57-
{/* Title and Description */}
58-
<div className={s.textPreview}>
59-
<h2 className={s.title}>{title}</h2>
60-
<p className={s.description}>{description}</p>
61-
</div>
56+
{/* Title and Description */}
57+
<div className={s.textPreview}>
58+
<h2 className={s.title}>{title}</h2>
59+
<p className={s.description}>{description}</p>
6260
</div>
63-
</a>
61+
</div>
6462
</Link>
6563
</div>
6664
</>

components/common/social-links/social-links.jsx

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,60 +7,58 @@ export default function SocialLinks() {
77
return (
88
<>
99
{/* Github */}
10-
<Link href="https://github.com/mateonunez" passHref>
11-
<a
12-
className={s.personalLink}
13-
target="_blank"
14-
rel="noopener noreferrer"
15-
aria-label="Github | Mateo Nunez">
16-
<Github />
17-
</a>
10+
<Link
11+
href="https://github.com/mateonunez"
12+
passHref
13+
className={s.personalLink}
14+
target="_blank"
15+
rel="noopener noreferrer"
16+
aria-label="Github | Mateo Nunez">
17+
<Github />
1818
</Link>
1919

2020
{/* Twitter */}
21-
<Link href="https://twitter.com/mateonunez95" passHref>
22-
<a
23-
className={s.personalLink}
24-
target="_blank"
25-
rel="noopener noreferrer"
26-
aria-label="Twitter | Mateo Nunez">
27-
<Twitter />
28-
</a>
21+
<Link
22+
href="https://twitter.com/mateonunez95"
23+
passHref
24+
className={s.personalLink}
25+
target="_blank"
26+
rel="noopener noreferrer"
27+
aria-label="Twitter | Mateo Nunez">
28+
<Twitter />
2929
</Link>
3030

3131
{/* LinkedIn */}
32-
<Link href="https://www.linkedin.com/in/mateo-nunez" passHref>
33-
<a
34-
className={s.personalLink}
35-
target="_blank"
36-
rel="noopener noreferrer"
37-
aria-label="LinkedIn | Mateo Nunez">
38-
<LinkedIn />
39-
</a>
32+
<Link
33+
href="https://www.linkedin.com/in/mateo-nunez"
34+
passHref
35+
className={s.personalLink}
36+
target="_blank"
37+
rel="noopener noreferrer"
38+
aria-label="LinkedIn | Mateo Nunez">
39+
<LinkedIn />
4040
</Link>
4141

4242
{/* Instagram */}
43-
<Link href="https://www.instagram.com/mateonunez95/" passHref>
44-
<a
45-
className={s.personalLink}
46-
target="_blank"
47-
rel="noopener noreferrer"
48-
aria-label="Instagram | Mateo Nunez">
49-
<Instagram />
50-
</a>
43+
<Link
44+
href="https://www.instagram.com/mateonunez95/"
45+
passHref
46+
className={s.personalLink}
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
aria-label="Instagram | Mateo Nunez">
50+
<Instagram />
5151
</Link>
5252

5353
{/* Spotify */}
5454
<Link
5555
href="https://open.spotify.com/user/ltstcqtg2k6q3a17xzdbmcd8q?si=c09bc43e12754f0b"
56-
passHref>
57-
<a
58-
className={s.personalLink}
59-
target="_blank"
60-
rel="noopener noreferrer"
61-
aria-label="Spotify | Mateo Nunez">
62-
<Spotify />
63-
</a>
56+
passHref
57+
className={s.personalLink}
58+
target="_blank"
59+
rel="noopener noreferrer"
60+
aria-label="Spotify | Mateo Nunez">
61+
<Spotify />
6462
</Link>
6563
</>
6664
);

components/github/cards/profile/profile.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ export default function Profile({ avatar, bio, company, email, username, url, lo
3232
{/* Bio */}
3333
<p className={s.bio}>{bio}</p>
3434
{/* Url */}
35-
<Link href={url}>
36-
<a title="Github" aria-label="Github" rel="canonical" target="_blank">
37-
{url}
38-
</a>
35+
<Link href={url} title="Github" aria-label="Github" rel="canonical" target="_blank">
36+
{url}
3937
</Link>
4038
</div>
4139
</div>

components/github/repositories/preview/preview.jsx

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ export default function RepositoryPreview({
1818
{/* Heading */}
1919

2020
{/* Name */}
21-
<Link href={url}>
22-
<a
23-
rel="canonical noreferrer"
24-
target="_blank"
25-
className={s.name}
26-
title={name}
27-
href={url}>
28-
{name}
29-
</a>
21+
<Link
22+
href={url}
23+
rel="canonical noreferrer"
24+
target="_blank"
25+
className={s.name}
26+
title={name}>
27+
{name}
3028
</Link>
3129

3230
{/* Description */}
@@ -44,33 +42,29 @@ export default function RepositoryPreview({
4442

4543
{/* Stars */}
4644
<div className={s.stars}>
47-
<Link href={`${url}/stargazers`}>
48-
<a
49-
href={`${url}/stargazers`}
50-
rel="canonical noreferrer"
51-
target="_blank"
52-
aria-label={`${name} stars`}
53-
title={`${name} stars`}
54-
className="flex">
55-
<Star className="w-5 h-5" />
56-
<span className={s.starsCount}>{stars}</span>
57-
</a>
45+
<Link
46+
href={`${url}/stargazers`}
47+
rel="canonical noreferrer"
48+
target="_blank"
49+
aria-label={`${name} stars`}
50+
title={`${name} stars`}
51+
className="flex">
52+
<Star className="w-5 h-5" />
53+
<span className={s.starsCount}>{stars}</span>
5854
</Link>
5955
</div>
6056

6157
{/* Forks */}
6258
<div className={s.forks}>
63-
<Link href={`${url}/network/members`}>
64-
<a
65-
href={`${url}/network/members`}
66-
rel="canonical noreferrer"
67-
target="_blank"
68-
aria-label={`${name} forks`}
69-
title={`${name} forks`}
70-
className="flex">
71-
<Fork className="w-5 h-5" />
72-
<div className={s.forksCount}>{forks}</div>
73-
</a>
59+
<Link
60+
href={`${url}/network/members`}
61+
rel="canonical noreferrer"
62+
target="_blank"
63+
aria-label={`${name} forks`}
64+
title={`${name} forks`}
65+
className="flex">
66+
<Fork className="w-5 h-5" />
67+
<div className={s.forksCount}>{forks}</div>
7468
</Link>
7569
</div>
7670
</div>

0 commit comments

Comments
 (0)