Skip to content

Commit 5f37666

Browse files
👽️ Removed <a> tags inside <Link>
1 parent 340a403 commit 5f37666

File tree

6 files changed

+66
-64
lines changed

6 files changed

+66
-64
lines changed

components/Header.tsx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,35 @@ const Header = () => {
1313
return (
1414
<div className="justify-between px-2 mt-2 mb-2 ml-1.5 w-[99.2%] shadow-lg navbar bg-accent rounded-box">
1515
<Link href="/">
16-
<a>
17-
<div className="flex-none">
18-
<div className="w-10 h-10 m-1 rounded-full">
19-
<Image
20-
src="/hacktoberfest.svg"
21-
width={50}
22-
height={50}
23-
alt="Hacktoberfest"
24-
blurDataURL="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mPsrQcAAZ8BDlpDGcMAAAAASUVORK5CYII="
25-
placeholder="blur"
26-
/>
27-
</div>
16+
<div className="flex-none">
17+
<div className="w-10 h-10 m-1 rounded-full">
18+
<Image
19+
src="/hacktoberfest.svg"
20+
width={50}
21+
height={50}
22+
alt="Hacktoberfest"
23+
blurDataURL="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mPsrQcAAZ8BDlpDGcMAAAAASUVORK5CYII="
24+
placeholder="blur"
25+
/>
2826
</div>
29-
<div className="flex-1 hidden px-2 mx-auto lg:block">
30-
<span className="text-2xl font-bold text-center">
31-
Hacktoberfest Projects
32-
</span>
33-
</div>
34-
</a>
27+
</div>
28+
<div className="flex-1 hidden px-2 mx-auto lg:block">
29+
<span className="text-2xl font-bold text-center">
30+
Hacktoberfest Projects
31+
</span>
32+
</div>
3533
</Link>
3634
{router.pathname === '/repos/[language]' && (
3735
<div className="justify-center flex-1">
3836
<Search />
3937
</div>
4038
)}
4139
<div className="flex-none">
42-
<Link passHref href="/contributors">
43-
<a className="btn btn-square btn-ghost umami--click--contributors-button">
44-
<BsPeopleFill size="1.5rem" title="Contributors" />
45-
</a>
40+
<Link
41+
href="/contributors"
42+
className="btn btn-square btn-ghost umami--click--contributors-button"
43+
>
44+
<BsPeopleFill size="1.5rem" title="Contributors" />
4645
</Link>
4746
<a
4847
href="https://github.com/max-programming/hacktoberfest-projects"

components/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const Hero = () => {
4646
{otherLanguages.sort(sortByName).map(language => (
4747
<li key={language}>
4848
<Link href={`/repos/${language.toLowerCase()}`}>
49-
<a>{language}</a>
49+
{language}
5050
</Link>
5151
</li>
5252
))}

components/LanguageButton.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ import Link from 'next/link';
44
const LanguageButton = ({ language }: { language: string }) => {
55
return (
66
<Link href={`/repos/${language.toLowerCase()}`}>
7-
<a>
8-
<motion.button
9-
initial={{ scale: 0.2 }}
10-
animate={{ scale: 1 }}
11-
transition={{ duration: 0.3 }}
12-
whileHover={{ rotate: '4deg' }}
13-
className={`m-2 button border-0 btn btn-lg btn-clip umami--click--${language.toLowerCase()}-button`}
14-
>
15-
{language}
16-
</motion.button>
17-
</a>
7+
<motion.button
8+
initial={{ scale: 0.2 }}
9+
animate={{ scale: 1 }}
10+
transition={{ duration: 0.3 }}
11+
whileHover={{ rotate: '4deg' }}
12+
className={`m-2 button border-0 btn btn-lg btn-clip umami--click--${language.toLowerCase()}-button`}
13+
>
14+
{language}
15+
</motion.button>
1816
</Link>
1917
);
2018
};

components/Pagination.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ const Pagination = ({ page, totalCount }: Props) => {
1414
return (
1515
<div className="items-center flex justify-evenly my-6 flex-col gap-4 sm:gap-0 sm:flex-row">
1616
{page > 1 && (
17-
<Link href={{ query: { ...router.query, p: page - 1 } }}>
18-
<a className="btn btn-wide">
19-
<BsArrowLeft />
20-
<span className="ml-2">Previous Page</span>
21-
</a>
17+
<Link
18+
href={{ query: { ...router.query, p: page - 1 } }}
19+
className="btn btn-wide"
20+
>
21+
<BsArrowLeft />
22+
<span className="ml-2">Previous Page</span>
2223
</Link>
2324
)}
2425
{totalCount >= MAX_PER_PAGE &&
2526
page < Math.ceil(totalCount / MAX_PER_PAGE) && (
26-
<Link href={{ query: { ...router.query, p: page + 1 } }}>
27-
<a className="btn btn-wide">
28-
<span className="mr-2">Next Page</span>
29-
<BsArrowRight />
30-
</a>
27+
<Link
28+
href={{ query: { ...router.query, p: page + 1 } }}
29+
className="btn btn-wide"
30+
>
31+
<span className="mr-2">Next Page</span>
32+
<BsArrowRight />
3133
</Link>
3234
)}
3335
</div>

components/Sort.tsx

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function Sort() {
5454
{mainLanguages.sort(sortByName).map(language => (
5555
<li key={language}>
5656
<Link href={`/repos/${language.toLowerCase()}`}>
57-
<a>{language}</a>
57+
{language}
5858
</Link>
5959
</li>
6060
))}
@@ -70,33 +70,32 @@ export default function Sort() {
7070
{selectedSort()}
7171
</div>
7272
<div className="h-64 p-2 overflow-y-scroll shadow dropdown-content bg-base-100 rounded-box w-60">
73-
<ul
74-
tabIndex={0}
75-
className="menu menu-vertical"
76-
>
73+
<ul tabIndex={0} className="menu menu-vertical">
7774
<li>
78-
<Link href={{ query: { ...router.query } }}>
79-
<a>Best match</a>
80-
</Link>
75+
<Link href={{ query: { ...router.query } }}>Best match</Link>
8176
</li>
8277
<li>
83-
<Link href={{ query: { ...router.query, s: 'stars', o: 'desc' } }}>
84-
<a>Most stars</a>
78+
<Link
79+
href={{ query: { ...router.query, s: 'stars', o: 'desc' } }}
80+
>
81+
Most stars
8582
</Link>
8683
</li>
8784
<li>
8885
<Link href={{ query: { ...router.query, s: 'stars', o: 'asc' } }}>
89-
<a>Fewest stars</a>
86+
Fewest stars
9087
</Link>
9188
</li>
9289
<li>
93-
<Link href={{ query: { ...router.query, s: 'forks', o: 'desc' } }}>
94-
<a>Most forks</a>
90+
<Link
91+
href={{ query: { ...router.query, s: 'forks', o: 'desc' } }}
92+
>
93+
Most forks
9594
</Link>
9695
</li>
9796
<li>
9897
<Link href={{ query: { ...router.query, s: 'forks', o: 'asc' } }}>
99-
<a>Fewest forks</a>
98+
Fewest forks
10099
</Link>
101100
</li>
102101
<li>
@@ -105,17 +104,21 @@ export default function Sort() {
105104
query: { ...router.query, s: 'help-wanted-issues', o: 'desc' }
106105
}}
107106
>
108-
<a>Most help wanted issues</a>
107+
Most help wanted issues
109108
</Link>
110109
</li>
111110
<li>
112-
<Link href={{ query: { ...router.query, s: 'updated', o: 'desc' } }}>
113-
<a>Recently updated</a>
111+
<Link
112+
href={{ query: { ...router.query, s: 'updated', o: 'desc' } }}
113+
>
114+
Recently updated
114115
</Link>
115116
</li>
116117
<li>
117-
<Link href={{ query: { ...router.query, s: 'updated', o: 'asc' } }}>
118-
<a>Least recently updated</a>
118+
<Link
119+
href={{ query: { ...router.query, s: 'updated', o: 'asc' } }}
120+
>
121+
Least recently updated
119122
</Link>
120123
</li>
121124
</ul>

pages/404.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Custom404() {
1515
The Page you are looking for might have been removed or it is
1616
Temporarily unavailable
1717
</p>
18-
<Link rel="stylesheet" href="/">
18+
<Link href="/">
1919
<button className="rounded-none transition delay-150 duration-300 ease-in-out btn shadow-lg button mt-6 mt-[3rem] bg-[#fafafa] text-[#170f1e] ">
2020
Go back Home
2121
</button>

0 commit comments

Comments
 (0)