Skip to content

Commit eb9f01b

Browse files
committed
update legacy anchor tag
1 parent c49cc7e commit eb9f01b

27 files changed

Lines changed: 346 additions & 531 deletions

‎apps/codingcatdev/src/components/HomeDetails.tsx‎

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ const HomeDetail = ({ site, recentPosts }: StaticParams) => {
3434
Latest Courses
3535
</h2>
3636
<PostsCards posts={recentPosts[PostType.course]} />
37-
<Link href="/courses">
38-
<a className="justify-self-center">
39-
<button className="btn-primary" type="button">
40-
View All Courses
41-
</button>
42-
</a>
37+
<Link href="/courses" className="justify-self-center">
38+
<button className="btn-primary" type="button">
39+
View All Courses
40+
</button>
4341
</Link>
4442
</section>
4543
{/* TUTORIALS */}
@@ -55,12 +53,10 @@ const HomeDetail = ({ site, recentPosts }: StaticParams) => {
5553
Latest Tutorials
5654
</h2>
5755
<PostsCards posts={recentPosts[PostType.tutorial]} />
58-
<Link href="/tutorials">
59-
<a className="justify-self-center">
60-
<button className="btn-primary" type="button">
61-
View All Tutorials
62-
</button>
63-
</a>
56+
<Link href="/tutorials" className="justify-self-center">
57+
<button className="btn-primary" type="button">
58+
View All Tutorials
59+
</button>
6460
</Link>
6561
</section>
6662
{/* BLOG */}
@@ -77,12 +73,10 @@ const HomeDetail = ({ site, recentPosts }: StaticParams) => {
7773
Blog Posts
7874
</h2>
7975
<PostsCards posts={recentPosts[PostType.post]} />
80-
<Link href="/blog">
81-
<a className="justify-self-center">
82-
<button className="btn-primary" type="button">
83-
View All Posts
84-
</button>
85-
</a>
76+
<Link href="/blog" className="justify-self-center">
77+
<button className="btn-primary" type="button">
78+
View All Posts
79+
</button>
8680
</Link>
8781
</section>
8882
{/* PODCASTS */}
@@ -99,12 +93,10 @@ const HomeDetail = ({ site, recentPosts }: StaticParams) => {
9993
Latest Podcasts
10094
</h2>
10195
<PostsCards posts={recentPosts[PostType.podcast]} />
102-
<Link href="/podcasts">
103-
<a className="justify-self-center">
104-
<button className="btn-primary" type="button">
105-
View All Podcasts
106-
</button>
107-
</a>
96+
<Link href="/podcasts" className="justify-self-center">
97+
<button className="btn-primary" type="button">
98+
View All Podcasts
99+
</button>
108100
</Link>
109101
</section>
110102
</div>

‎apps/codingcatdev/src/components/NotionPagination.tsx‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ export const Pagination = ({
1919
{posts && (pageNumber > 1 || showNext) && (
2020
<div className="flex items-center justify-center w-full my-4 space-x-2">
2121
{pageNumber > 1 && (
22-
<Link href={`/${baseUrl}/page/${pageNumber - 1}`}>
23-
<a className="btn-secondary">‹ Previous</a>
22+
<Link
23+
href={`/${baseUrl}/page/${pageNumber - 1}`}
24+
className="btn-secondary"
25+
>
26+
‹ Previous
2427
</Link>
2528
)}
2629

2730
{showNext && (
28-
<Link href={`/${baseUrl}/page/${pageNumber + 1}`}>
29-
<a className="btn-primary">Next ›</a>
31+
<Link
32+
href={`/${baseUrl}/page/${pageNumber + 1}`}
33+
className="btn-primary"
34+
>
35+
Next ›
3036
</Link>
3137
)}
3238
</div>

‎apps/codingcatdev/src/components/PostMediaLocked.tsx‎

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export default function PostMediaLocked({
2323
You have found a
2424
</p>
2525
<p className="flex justify-center">
26-
<NextLink href="/user/profile">
27-
<a className="p-4 m-4 text-6xl font-bold rounded-2xl text-primary-50 bg-secondary-500 btn-secondary">
28-
Free Course
29-
</a>
26+
<NextLink
27+
href="/user/profile"
28+
className="p-4 m-4 text-6xl font-bold rounded-2xl text-primary-50 bg-secondary-500 btn-secondary"
29+
>
30+
Free Course
3031
</NextLink>
3132
</p>
3233
<p>Once you login, you have access.</p>
@@ -36,26 +37,27 @@ export default function PostMediaLocked({
3637
courses.
3738
</p>
3839
</div>
39-
<NextLink href="/user/profile">
40-
<a className="btn-primary">Login / Become Member</a>
40+
<NextLink href="/user/profile" className="btn-primary">
41+
Login / Become Member
4142
</NextLink>
4243
<div className="flex justify-center">
43-
<NextLink href="/user/profile">
44-
<a className="flex items-center py-1 text-xs transition-all duration-200 ease-in-out group opacity-80 hover:opacity-100">
45-
Pay yearly or monthly{' '}
46-
<svg
44+
<NextLink
45+
href="/user/profile"
46+
className="flex items-center py-1 text-xs transition-all duration-200 ease-in-out group opacity-80 hover:opacity-100"
47+
>
48+
Pay yearly or monthly{' '}
49+
<svg
50+
xmlns="http://www.w3.org/2000/svg"
51+
data-name="Layer 1"
52+
viewBox="0 0 24 24"
53+
xmlSpace="preserve"
54+
className="w-6 fill-current"
55+
>
56+
<path
4757
xmlns="http://www.w3.org/2000/svg"
48-
data-name="Layer 1"
49-
viewBox="0 0 24 24"
50-
xmlSpace="preserve"
51-
className="w-6 fill-current"
52-
>
53-
<path
54-
xmlns="http://www.w3.org/2000/svg"
55-
d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76z"
56-
/>
57-
</svg>
58-
</a>
58+
d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76z"
59+
/>
60+
</svg>
5961
</NextLink>
6062
</div>
6163
</section>
@@ -109,26 +111,27 @@ export default function PostMediaLocked({
109111
<span className="pl-1 sm:text-lg">/ month</span>
110112
</div>
111113
</div>
112-
<NextLink href="/user/profile">
113-
<a className="btn-primary">Login / Become Member</a>
114+
<NextLink href="/user/profile" className="btn-primary">
115+
Login / Become Member
114116
</NextLink>
115117
<div className="flex justify-center">
116-
<NextLink href="/user/profile">
117-
<a className="flex items-center py-1 mt-4 text-xs transition-all duration-200 ease-in-out group opacity-80 hover:opacity-100">
118-
Pay yearly or monthly{' '}
119-
<svg
118+
<NextLink
119+
href="/user/profile"
120+
className="flex items-center py-1 mt-4 text-xs transition-all duration-200 ease-in-out group opacity-80 hover:opacity-100"
121+
>
122+
Pay yearly or monthly{' '}
123+
<svg
124+
xmlns="http://www.w3.org/2000/svg"
125+
data-name="Layer 1"
126+
viewBox="0 0 24 24"
127+
xmlSpace="preserve"
128+
className="w-6 fill-current"
129+
>
130+
<path
120131
xmlns="http://www.w3.org/2000/svg"
121-
data-name="Layer 1"
122-
viewBox="0 0 24 24"
123-
xmlSpace="preserve"
124-
className="w-6 fill-current"
125-
>
126-
<path
127-
xmlns="http://www.w3.org/2000/svg"
128-
d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76z"
129-
/>
130-
</svg>
131-
</a>
132+
d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76z"
133+
/>
134+
</svg>
132135
</NextLink>
133136
</div>
134137
</section>

‎apps/codingcatdev/src/components/PostsCards.tsx‎

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,62 @@ export default function PostsCards({ posts }: { posts: Post[] }): JSX.Element {
1414
className="grid transition-all rounded-md shadow-lg dark:text-primary-50 dark:bg-basics-900 grid-rows-auto-2 hover:shadow-2xl hover:scale-105 bg-basics-50"
1515
key={post._id}
1616
>
17-
<Link href={`/${post._type}/${post.slug}`}>
18-
<a className="self-start">
19-
{post.coverPhoto?.public_id && post._type === 'course' ? (
20-
<>
21-
<Image
22-
src={post.coverPhoto?.public_id}
23-
alt={post.title}
24-
width="480"
25-
height="270"
26-
layout="responsive"
27-
className="rounded-md rounded-b-none cursor-pointer"
28-
/>
29-
</>
30-
) : post.coverPhoto?.public_id ? (
31-
<>
32-
<Image
33-
src={post.coverPhoto?.public_id}
34-
alt={post.title}
35-
width="480"
36-
height="270"
37-
layout="responsive"
38-
className="rounded-md rounded-b-none cursor-pointer"
39-
/>
40-
</>
41-
) : (
42-
<div
43-
className="relative"
44-
style={{ paddingBottom: '56.25%' }}
45-
>
46-
<div className="absolute flex items-center flex-auto w-full h-full rounded-t-md bg-primary-900 dark:bg-primary-900">
47-
<AJPrimary className="w-full h-full p-4" />
48-
</div>
17+
<Link
18+
href={`/${post._type}/${post.slug}`}
19+
className="self-start"
20+
>
21+
{post.coverPhoto?.public_id && post._type === 'course' ? (
22+
<>
23+
<Image
24+
src={post.coverPhoto?.public_id}
25+
alt={post.title}
26+
width="480"
27+
height="270"
28+
layout="responsive"
29+
className="rounded-md rounded-b-none cursor-pointer"
30+
/>
31+
</>
32+
) : post.coverPhoto?.public_id ? (
33+
<>
34+
<Image
35+
src={post.coverPhoto?.public_id}
36+
alt={post.title}
37+
width="480"
38+
height="270"
39+
layout="responsive"
40+
className="rounded-md rounded-b-none cursor-pointer"
41+
/>
42+
</>
43+
) : (
44+
<div
45+
className="relative"
46+
style={{ paddingBottom: '56.25%' }}
47+
>
48+
<div className="absolute flex items-center flex-auto w-full h-full rounded-t-md bg-primary-900 dark:bg-primary-900">
49+
<AJPrimary className="w-full h-full p-4" />
4950
</div>
50-
)}
51-
</a>
51+
</div>
52+
)}
5253
</Link>
5354

5455
<section className="grid h-full grid-cols-1 gap-2 p-4">
5556
<div className="space-y-2">
5657
<h3 className="font-sans text-lg tracking-wide text-bold">
5758
<Link href={`/${post._type}/${post.slug}`}>
58-
<a>{post.title}</a>
59+
{post.title}
5960
</Link>
6061
</h3>
6162
{post.excerpt && (
6263
<p className="text-sm font-hairline ">{post.excerpt}</p>
6364
)}
6465
<div className="flex flex-col">
6566
{post.authors?.map((author, i) => (
66-
<Link href={`/authors/${author.slug}`} key={i}>
67-
<a className="font-sans text-lg">
68-
{author.displayName}
69-
</a>
67+
<Link
68+
href={`/authors/${author.slug}`}
69+
key={i}
70+
className="font-sans text-lg"
71+
>
72+
{author.displayName}
7073
</Link>
7174
))}
7275
</div>

‎apps/codingcatdev/src/components/PurrfectDevUpper.tsx‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export default function PurrfectDevUpper(): JSX.Element {
1212
</h1>
1313
<p className="font-sans 2xl:text-2xl" style={{ maxWidth: `40ch` }}>
1414
A weekly podcast about web design and development from{' '}
15-
<Link href="/authors/alex-patterson">
16-
<a className="underline">Alex Patterson</a>
15+
<Link href="/authors/alex-patterson" className="underline">
16+
Alex Patterson
1717
</Link>{' '}
1818
and{' '}
19-
<Link href="/authors/brittney-postma">
20-
<a className="underline">Brittney Postma</a>
19+
<Link href="/authors/brittney-postma" className="underline">
20+
Brittney Postma
2121
</Link>
2222
.
2323
</p>
@@ -42,16 +42,16 @@ export default function PurrfectDevUpper(): JSX.Element {
4242
</button>
4343
</a>
4444
<Link href="/sponsorship">
45-
<a>
46-
<button className="flex items-center btn-secondary-reverse">
47-
Ad Sponsorship
48-
</button>
49-
</a>
45+
<button className="flex items-center btn-secondary-reverse">
46+
Ad Sponsorship
47+
</button>
5048
</Link>
51-
<Link href="/sponsors">
52-
<a className="flex items-center justify-center text-2xl underline">
53-
See Our Sponsors <AJHeartsLeft />
54-
</a>
49+
<Link
50+
href="/sponsors"
51+
className="flex items-center justify-center text-2xl underline"
52+
>
53+
See Our Sponsors
54+
<AJHeartsLeft />
5555
</Link>
5656
</div>
5757
</section>

‎apps/codingcatdev/src/components/RecentPostsList.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export default function RecentPostsList({
2323
}
2424
`}
2525
>
26-
<ActiveLink href={`/${post._type}/${post.slug}`}>
27-
<a className="no-underline border-none hover:text-basics-50 dark:hover:text-basics-50">
28-
{post.title}
29-
</a>
26+
<ActiveLink
27+
href={`/${post._type}/${post.slug}`}
28+
className="no-underline border-none hover:text-basics-50 dark:hover:text-basics-50"
29+
>
30+
{post.title}
3031
</ActiveLink>
3132
</li>
3233
))}

0 commit comments

Comments
 (0)