Skip to content

Commit fadaaf9

Browse files
authored
Merge branch 'main' into update-turbo
2 parents bd806f3 + c06b861 commit fadaaf9

File tree

9 files changed

+203
-185
lines changed

9 files changed

+203
-185
lines changed

Diff for: www/components/card.tsx

+9-8
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ interface CardProps extends LinkProps {
88

99
export function Card({ children, href, ...props }: CardProps) {
1010
return (
11-
<Link href={href} passHref {...props}>
12-
<a
13-
className={classNames(
14-
"block p-6 bg-white group border border-gray-200 rounded-lg shadow-md card"
15-
)}
16-
>
17-
{children}
18-
</a>
11+
<Link
12+
href={href}
13+
passHref
14+
{...props}
15+
className={classNames(
16+
"block p-6 bg-white group border border-gray-200 rounded-lg shadow-md card"
17+
)}
18+
>
19+
{children}
1920
</Link>
2021
)
2122
}

Diff for: www/components/layout.tsx

+50-47
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,33 @@ export function Layout({
8686
>
8787
<ul className="grid grid-flow-row gap-2 mb-8 auto-rows-max">
8888
<li>
89-
<Link href="/" passHref>
90-
<a
91-
className={classNames(
92-
"text-sm font-medium hover:underline",
93-
pathname === "/" ? "text-blue-700" : "text-gray-700"
94-
)}
95-
>
96-
Home
97-
</a>
89+
<Link
90+
href="/"
91+
passHref
92+
className={classNames(
93+
"text-sm font-medium hover:underline",
94+
pathname === "/" ? "text-blue-700" : "text-gray-700"
95+
)}
96+
>
97+
Home
9898
</Link>
9999
</li>
100100
{site.links.map((link, index) => {
101101
const isActive =
102102
pathname === link.href || link.activePathNames?.includes(pathname)
103103
return (
104104
<li key={index}>
105-
<Link href={link.href} passHref>
106-
<a
107-
className={classNames(
108-
"text-sm font-medium hover:underline",
109-
isActive ? "text-blue-700" : "text-gray-900"
110-
)}
111-
target={link.external ? "_blank" : "_self"}
112-
rel={link.external ? "noreferrer" : ""}
113-
>
114-
{link.title}
115-
</a>
105+
<Link
106+
href={link.href}
107+
passHref
108+
className={classNames(
109+
"text-sm font-medium hover:underline",
110+
isActive ? "text-blue-700" : "text-gray-900"
111+
)}
112+
target={link.external ? "_blank" : "_self"}
113+
rel={link.external ? "noreferrer" : ""}
114+
>
115+
{link.title}
116116
</Link>
117117
</li>
118118
)
@@ -170,29 +170,32 @@ export function Layout({
170170
<span className="sr-only">Toggle Menu</span>
171171
</button>
172172
<div className="flex items-center space-x-8">
173-
<Link href="/" passHref>
174-
<a className="items-center flex-shrink hidden font-semibold sm:flex sm:text-lg lg:text-base xl:text-lg">
175-
{site.name}
176-
</a>
173+
<Link
174+
href="/"
175+
passHref
176+
className="items-center flex-shrink hidden font-semibold sm:flex sm:text-lg lg:text-base xl:text-lg"
177+
>
178+
{site.name}
177179
</Link>
178180
<div className="flex-grow hidden grid-flow-col gap-6 mr-4 lg:grid lg:mr-4 lg:gap-4 xl:gap-6 auto-cols-max">
179181
{site.links.map((link) => {
180182
const isActive =
181183
pathname === link.href ||
182184
link.activePathNames?.includes(pathname)
183185
return (
184-
<Link key={link.href} href={link.href} passHref>
185-
<a
186-
className={classNames(
187-
"hover:underline",
188-
mode === "dark" ? "text-white" : "hover:text-black",
189-
isActive ? "text-black" : "text-gray-600"
190-
)}
191-
target={link.external ? "_blank" : "_self"}
192-
rel={link.external ? "noreferrer" : ""}
193-
>
194-
{link.title}
195-
</a>
186+
<Link
187+
key={link.href}
188+
href={link.href}
189+
passHref
190+
className={classNames(
191+
"hover:underline",
192+
mode === "dark" ? "text-white" : "hover:text-black",
193+
isActive ? "text-black" : "text-gray-600"
194+
)}
195+
target={link.external ? "_blank" : "_self"}
196+
rel={link.external ? "noreferrer" : ""}
197+
>
198+
{link.title}
196199
</Link>
197200
)
198201
})}
@@ -276,17 +279,17 @@ export function Layout({
276279
<Menu.Item key={version.version}>
277280
{({ active }) =>
278281
version.url ? (
279-
<Link href={version.url} passHref>
280-
<a
281-
className={classNames(
282-
"text-sm px-3 py-1 hover:bg-blue-50",
283-
{
284-
"bg-blue-50": active,
285-
}
286-
)}
287-
>
288-
{version.version}
289-
</a>
282+
<Link
283+
href={version.url}
284+
passHref
285+
className={classNames(
286+
"text-sm px-3 py-1 hover:bg-blue-50",
287+
{
288+
"bg-blue-50": active,
289+
}
290+
)}
291+
>
292+
{version.version}
290293
</Link>
291294
) : (
292295
<span

Diff for: www/components/pager.tsx

+34-30
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,43 @@ export function Pager({ links }: PagerProps) {
1313
return (
1414
<div className="flex items-center justify-between mt-10 md:mt-14">
1515
{prev ? (
16-
<Link href={prev.href} passHref>
17-
<a className="flex items-center px-4 py-3 leading-none text-gray-600 border rounded-md hover:text-black">
18-
<svg
19-
className="w-4 h-4 mr-2"
20-
viewBox="0 0 24 24"
21-
fill="none"
22-
stroke="currentColor"
23-
strokeWidth="2"
24-
strokeLinecap="round"
25-
strokeLinejoin="round"
26-
>
27-
<path d="M19 12H5M12 19l-7-7 7-7" />
28-
</svg>
29-
{prev.title}
30-
</a>
16+
<Link
17+
href={prev.href}
18+
passHref
19+
className="flex items-center px-4 py-3 leading-none text-gray-600 border rounded-md hover:text-black"
20+
>
21+
<svg
22+
className="w-4 h-4 mr-2"
23+
viewBox="0 0 24 24"
24+
fill="none"
25+
stroke="currentColor"
26+
strokeWidth="2"
27+
strokeLinecap="round"
28+
strokeLinejoin="round"
29+
>
30+
<path d="M19 12H5M12 19l-7-7 7-7" />
31+
</svg>
32+
{prev.title}
3133
</Link>
3234
) : null}
3335
{next ? (
34-
<Link href={next.href} passHref>
35-
<a className="flex items-center px-4 py-3 ml-auto leading-none text-gray-600 border rounded-md hover:text-black">
36-
{next.title}
37-
<svg
38-
className="w-4 h-4 ml-2"
39-
viewBox="0 0 24 24"
40-
fill="none"
41-
stroke="currentColor"
42-
strokeWidth="2"
43-
strokeLinecap="round"
44-
strokeLinejoin="round"
45-
>
46-
<path d="M5 12h14M12 5l7 7-7 7" />
47-
</svg>
48-
</a>
36+
<Link
37+
href={next.href}
38+
passHref
39+
className="flex items-center px-4 py-3 ml-auto leading-none text-gray-600 border rounded-md hover:text-black"
40+
>
41+
{next.title}
42+
<svg
43+
className="w-4 h-4 ml-2"
44+
viewBox="0 0 24 24"
45+
fill="none"
46+
stroke="currentColor"
47+
strokeWidth="2"
48+
strokeLinecap="round"
49+
strokeLinejoin="round"
50+
>
51+
<path d="M5 12h14M12 5l7 7-7 7" />
52+
</svg>
4953
</Link>
5054
) : null}
5155
</div>

Diff for: www/components/sidebar-nav.tsx

+31-30
Original file line numberDiff line numberDiff line change
@@ -35,36 +35,37 @@ export function SidebarNavItem({ items, onLinkClick }: SidebarNavProps) {
3535
return items?.length ? (
3636
<div className="grid grid-flow-row text-sm auto-rows-max">
3737
{items.map((item, index) => (
38-
<Link key={index} href={item.href} passHref>
39-
<a
40-
className={classNames(
41-
"px-2 py-2 flex items-center w-full rounded-md hover:underline text-black",
42-
{
43-
"bg-blue-50": asPath === item.href,
44-
}
45-
)}
46-
onClick={onLinkClick}
47-
target={item.external && "_blank"}
48-
rel={item.external ? "noreferrer" : ""}
49-
>
50-
{item.title}{" "}
51-
{item.external && (
52-
<svg
53-
xmlns="http://www.w3.org/2000/svg"
54-
className="w-3 h-3 ml-1"
55-
fill="none"
56-
viewBox="0 0 24 24"
57-
stroke="currentColor"
58-
strokeWidth="2"
59-
>
60-
<path
61-
strokeLinecap="round"
62-
strokeLinejoin="round"
63-
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
64-
/>
65-
</svg>
66-
)}
67-
</a>
38+
<Link
39+
key={index}
40+
href={item.href}
41+
passHref
42+
className={classNames(
43+
"px-2 py-2 flex items-center w-full rounded-md hover:underline text-black",
44+
{
45+
"bg-blue-50": asPath === item.href,
46+
}
47+
)}
48+
onClick={onLinkClick}
49+
target={item.external && "_blank"}
50+
rel={item.external ? "noreferrer" : ""}
51+
>
52+
{item.title}{" "}
53+
{item.external && (
54+
<svg
55+
xmlns="http://www.w3.org/2000/svg"
56+
className="w-3 h-3 ml-1"
57+
fill="none"
58+
viewBox="0 0 24 24"
59+
stroke="currentColor"
60+
strokeWidth="2"
61+
>
62+
<path
63+
strokeLinecap="round"
64+
strokeLinejoin="round"
65+
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
66+
/>
67+
</svg>
68+
)}
6869
</Link>
6970
))}
7071
</div>

Diff for: www/pages/blog/index.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function BlogsPage({ blogs }: BlogsPageProps) {
2424
<article key={blog.slug}>
2525
<h2 className="text-2xl font-bold leading-tight sm:text-3xl md:text-3xl">
2626
<Link href={blog.url} passHref>
27-
<a>{blog.frontMatter.title}</a>
27+
{blog.frontMatter.title}
2828
</Link>
2929
</h2>
3030
<p className="mt-2 text-gray-700">
@@ -34,10 +34,12 @@ export default function BlogsPage({ blogs }: BlogsPageProps) {
3434
<p className="my-4 text-gray-700">{blog.frontMatter.excerpt}</p>
3535
) : null}
3636

37-
<Link href={blog.url} passHref>
38-
<a className="text-sm text-blue-500 hover:text-black">
39-
Read More →
40-
</a>
37+
<Link
38+
href={blog.url}
39+
passHref
40+
className="text-sm text-blue-500 hover:text-black"
41+
>
42+
Read More →
4143
</Link>
4244
<hr className="py-6 mt-6" />
4345
</article>

Diff for: www/pages/guides/index.tsx

+29-27
Original file line numberDiff line numberDiff line change
@@ -40,35 +40,37 @@ export default function GuidesPage({ guides }: GuidesPageProps) {
4040
) : null}
4141
</div>
4242
{guide.frontMatter.externalUrl ? (
43-
<Link href={guide.frontMatter.externalUrl} passHref>
44-
<a
45-
className="text-sm text-blue-500 transition-colors"
46-
target="_blank"
47-
rel="nofollow"
48-
>
49-
<span className="absolute inset-0" />
50-
<div className="flex items-center">
51-
Read More{" "}
52-
<svg
53-
viewBox="0 0 24 24"
54-
fill="none"
55-
stroke="currentColor"
56-
strokeWidth="2"
57-
strokeLinecap="round"
58-
strokeLinejoin="round"
59-
className="w-3 h-3 ml-2"
60-
>
61-
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3" />
62-
</svg>
63-
</div>
64-
</a>
43+
<Link
44+
href={guide.frontMatter.externalUrl}
45+
passHref
46+
className="text-sm text-blue-500 transition-colors"
47+
target="_blank"
48+
rel="nofollow"
49+
>
50+
<span className="absolute inset-0" />
51+
<div className="flex items-center">
52+
Read More{" "}
53+
<svg
54+
viewBox="0 0 24 24"
55+
fill="none"
56+
stroke="currentColor"
57+
strokeWidth="2"
58+
strokeLinecap="round"
59+
strokeLinejoin="round"
60+
className="w-3 h-3 ml-2"
61+
>
62+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3" />
63+
</svg>
64+
</div>
6565
</Link>
6666
) : (
67-
<Link href={guide.url} passHref>
68-
<a className="text-sm text-blue-500 transition-colors">
69-
<span className="absolute inset-0" />
70-
Read More →
71-
</a>
67+
<Link
68+
href={guide.url}
69+
passHref
70+
className="text-sm text-blue-500 transition-colors"
71+
>
72+
<span className="absolute inset-0" />
73+
Read More →
7274
</Link>
7375
)}
7476
</article>

0 commit comments

Comments
 (0)