Unverified Commit ab42da06 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Run next/link codemod for Next.js 13 on examples (#41913)

parent 8ada894a
...@@ -52,7 +52,7 @@ const ActiveLink = ({ ...@@ -52,7 +52,7 @@ const ActiveLink = ({
]) ])
return ( return (
<Link {...props}> <Link {...props} legacyBehavior>
{React.cloneElement(child, { {React.cloneElement(child, {
className: className || null, className: className || null,
})} })}
......
...@@ -12,9 +12,7 @@ const Index: NextPage<IndexProps> = ({ name }) => { ...@@ -12,9 +12,7 @@ const Index: NextPage<IndexProps> = ({ name }) => {
<h1>Home Page</h1> <h1>Home Page</h1>
<p>Welcome, {name}</p> <p>Welcome, {name}</p>
<div> <div>
<Link href="/about"> <Link href="/about">About Page</Link>
<a>About Page</a>
</Link>
</div> </div>
</div> </div>
) )
......
...@@ -3,11 +3,7 @@ import Link from 'next/link' ...@@ -3,11 +3,7 @@ import Link from 'next/link'
export default function About() { export default function About() {
return ( return (
<div> <div>
Welcome to the about page. Go to the{' '} Welcome to the about page. Go to the <Link href="/">Home</Link> page.
<Link href="/">
<a>Home</a>
</Link>{' '}
page.
</div> </div>
) )
} }
...@@ -32,14 +32,8 @@ const Index = () => { ...@@ -32,14 +32,8 @@ const Index = () => {
if (viewer) { if (viewer) {
return ( return (
<div> <div>
You're signed in as {viewer.email} goto{' '} You're signed in as {viewer.email} goto <Link href="/about">about</Link>{' '}
<Link href="/about"> page. or <Link href="/signout">signout</Link>
<a>about</a>
</Link>{' '}
page. or{' '}
<Link href="/signout">
<a>signout</a>
</Link>
</div> </div>
) )
} }
......
...@@ -65,9 +65,7 @@ function SignIn() { ...@@ -65,9 +65,7 @@ function SignIn() {
label="Password" label="Password"
/> />
<button type="submit">Sign in</button> or{' '} <button type="submit">Sign in</button> or{' '}
<Link href="/signup"> <Link href="/signup">Sign up</Link>
<a>Sign up</a>
</Link>
</form> </form>
</> </>
) )
......
...@@ -60,9 +60,7 @@ function SignUp() { ...@@ -60,9 +60,7 @@ function SignUp() {
label="Password" label="Password"
/> />
<button type="submit">Sign up</button> or{' '} <button type="submit">Sign up</button> or{' '}
<Link href="/signin"> <Link href="/signin">Sign in</Link>
<a>Sign in</a>
</Link>
</form> </form>
</> </>
) )
......
...@@ -3,11 +3,7 @@ import Link from 'next/link' ...@@ -3,11 +3,7 @@ import Link from 'next/link'
export default function About() { export default function About() {
return ( return (
<div> <div>
This is a static page goto{' '} This is a static page goto <Link href="/">dynamic</Link> page.
<Link href="/">
<a>dynamic</a>
</Link>{' '}
page.
</div> </div>
) )
} }
...@@ -21,10 +21,7 @@ const Index = () => { ...@@ -21,10 +21,7 @@ const Index = () => {
return ( return (
<div> <div>
You're signed in as {viewer.name} and you're {viewer.status} goto{' '} You're signed in as {viewer.name} and you're {viewer.status} goto{' '}
<Link href="/about"> <Link href="/about">static</Link> page.
<a>static</a>
</Link>{' '}
page.
</div> </div>
) )
} }
......
...@@ -10,7 +10,7 @@ export default function UserListing({ users }) { ...@@ -10,7 +10,7 @@ export default function UserListing({ users }) {
{users.map((user) => ( {users.map((user) => (
<li key={user.username}> <li key={user.username}>
<Link href="/[username]" as={`/${user.username}`}> <Link href="/[username]" as={`/${user.username}`}>
<a>{user.name}</a> {user.name}
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -14,7 +14,7 @@ export default function Index() { ...@@ -14,7 +14,7 @@ export default function Index() {
<ul> <ul>
{data.map((user) => ( {data.map((user) => (
<li key={user.id}> <li key={user.id}>
<Link href="/user/[id]" as={`/user/${user.id}`}> <Link href="/user/[id]" as={`/user/${user.id}`} legacyBehavior>
{`User ${user.id}`} {`User ${user.id}`}
</Link> </Link>
</li> </li>
......
...@@ -9,7 +9,7 @@ export default function PersonComponent({ person }: PersonProps) { ...@@ -9,7 +9,7 @@ export default function PersonComponent({ person }: PersonProps) {
return ( return (
<li> <li>
<Link href="/person/[id]" as={`/person/${person.id}`}> <Link href="/person/[id]" as={`/person/${person.id}`}>
<a>{person.name}</a> {person.name}
</Link> </Link>
</li> </li>
) )
......
...@@ -11,17 +11,17 @@ const Header = ({ user, loading }: HeaderProps) => { ...@@ -11,17 +11,17 @@ const Header = ({ user, loading }: HeaderProps) => {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about" legacyBehavior>
<a>About</a> <a>About</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/advanced/api-profile"> <Link href="/advanced/api-profile" legacyBehavior>
<a>API rendered profile (advanced)</a> <a>API rendered profile (advanced)</a>
</Link> </Link>
</li> </li>
...@@ -29,12 +29,12 @@ const Header = ({ user, loading }: HeaderProps) => { ...@@ -29,12 +29,12 @@ const Header = ({ user, loading }: HeaderProps) => {
(user ? ( (user ? (
<> <>
<li> <li>
<Link href="/profile"> <Link href="/profile" legacyBehavior>
<a>Client rendered profile</a> <a>Client rendered profile</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/advanced/ssr-profile"> <Link href="/advanced/ssr-profile" legacyBehavior>
<a>Server rendered profile (advanced)</a> <a>Server rendered profile (advanced)</a>
</Link> </Link>
</li> </li>
......
...@@ -3,10 +3,7 @@ import Link from 'next/link' ...@@ -3,10 +3,7 @@ import Link from 'next/link'
const Home = () => { const Home = () => {
return ( return (
<div> <div>
Hello World.{' '} Hello World. <Link href="/about">About</Link>
<Link href="/about">
<a>About</a>
</Link>
</div> </div>
) )
} }
......
...@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => { ...@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link as={`/posts/${slug}`} href="/posts/[slug]"> <Link as={`/posts/${slug}`} href="/posts/[slug]" aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
const Header = () => { const Header = () => {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -29,8 +29,12 @@ const HeroPost = ({ ...@@ -29,8 +29,12 @@ const HeroPost = ({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-5xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-5xl leading-tight">
<Link as={`/posts/${slug}`} href="/posts/[slug]"> <Link
<a className="hover:underline">{title}</a> as={`/posts/${slug}`}
href="/posts/[slug]"
className="hover:underline"
>
{title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -27,8 +27,12 @@ const PostPreview = ({ ...@@ -27,8 +27,12 @@ const PostPreview = ({
<CoverImage slug={slug} title={title} src={coverImage} /> <CoverImage slug={slug} title={title} src={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link as={`/posts/${slug}`} href="/posts/[slug]"> <Link
<a className="hover:underline">{title}</a> as={`/posts/${slug}`}
href="/posts/[slug]"
className="hover:underline"
>
{title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -12,8 +12,12 @@ export default function NotePage({ ...@@ -12,8 +12,12 @@ export default function NotePage({
{allPosts.length ? ( {allPosts.length ? (
allPosts.map((post) => ( allPosts.map((post) => (
<article key={post.slug} className="mb-10"> <article key={post.slug} className="mb-10">
<Link as={`/posts/${post.slug}`} href="/posts/[slug]"> <Link
<a className="text-lg leading-6 font-bold">{post.title}</a> as={`/posts/${post.slug}`}
href="/posts/[slug]"
className="text-lg leading-6 font-bold"
>
{post.title}
</Link> </Link>
<p>{post.excerpt}</p> <p>{post.excerpt}</p>
<div className="text-gray-400"> <div className="text-gray-400">
......
...@@ -16,8 +16,8 @@ export default function CoverImage({ title, responsiveImage, slug = null }) { ...@@ -16,8 +16,8 @@ export default function CoverImage({ title, responsiveImage, slug = null }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -23,8 +23,8 @@ export default function HeroPost({ ...@@ -23,8 +23,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -21,8 +21,8 @@ export default function PostPreview({ ...@@ -21,8 +21,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage title={title} slug={slug} url={coverImage} /> <CoverImage title={title} slug={slug} url={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -15,8 +15,8 @@ export default function Blog({ posts }) { ...@@ -15,8 +15,8 @@ export default function Blog({ posts }) {
simple to launch a new company blog. simple to launch a new company blog.
</p> </p>
<p> <p>
<Link href={`/blog`}> <Link href={`/blog`} className="main-btn btn-hover mt-5">
<a className="main-btn btn-hover mt-5">View All Blog Posts</a> View All Blog Posts
</Link> </Link>
</p> </p>
</div> </div>
......
...@@ -8,7 +8,7 @@ export default function CategoriesWidget({ categories }) { ...@@ -8,7 +8,7 @@ export default function CategoriesWidget({ categories }) {
{categories.map((category) => ( {categories.map((category) => (
<li key={category.slug}> <li key={category.slug}>
<Link href={`/blog/category/${category.slug}`}> <Link href={`/blog/category/${category.slug}`}>
<a>{category.name}</a> {category.name}
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -23,15 +23,13 @@ export default function PostPreviewCondensed({ ...@@ -23,15 +23,13 @@ export default function PostPreviewCondensed({
)} )}
<div className="blog-body"> <div className="blog-body">
<h5 className="package-name"> <h5 className="package-name">
<Link href={`/blog/${slug}`}> <Link href={`/blog/${slug}`}>{title}</Link>
<a>{title}</a>
</Link>
</h5> </h5>
<p>{excerpt}</p> <p>{excerpt}</p>
</div> </div>
<div className="blog-footer"> <div className="blog-footer">
<Link href={`/blog/${slug}`}> <Link href={`/blog/${slug}`} className="main-btn btn-hover">
<a className="main-btn btn-hover">Read More</a> Read More
</Link> </Link>
</div> </div>
</div> </div>
......
...@@ -19,9 +19,7 @@ export default function PostsPreview({ ...@@ -19,9 +19,7 @@ export default function PostsPreview({
<div className="blog-roll-card"> <div className="blog-roll-card">
<div className="blog-roll-card-meta"> <div className="blog-roll-card-meta">
<h2 className="blog-roll-card-header"> <h2 className="blog-roll-card-header">
<Link href={`/blog/${slug}`}> <Link href={`/blog/${slug}`}>{title}</Link>
<a>{title}</a>
</Link>
</h2> </h2>
<ul className="blog-roll-card-meta-info"> <ul className="blog-roll-card-meta-info">
<li> <li>
...@@ -34,9 +32,7 @@ export default function PostsPreview({ ...@@ -34,9 +32,7 @@ export default function PostsPreview({
{tags.map((tag) => ( {tags.map((tag) => (
<li key={tag.slug}> <li key={tag.slug}>
<Link href={`/blog/tag/${tag.slug}`}> <Link href={`/blog/tag/${tag.slug}`}>
<a> <i className="lni lni-tag"></i> {tag.name}
<i className="lni lni-tag"></i> {tag.name}
</a>
</Link> </Link>
</li> </li>
))} ))}
...@@ -57,8 +53,8 @@ export default function PostsPreview({ ...@@ -57,8 +53,8 @@ export default function PostsPreview({
dangerouslySetInnerHTML={{ __html: excerpt }} dangerouslySetInnerHTML={{ __html: excerpt }}
></div> ></div>
<div className="blog-roll-card-footer text-center"> <div className="blog-roll-card-footer text-center">
<Link href={`/blog/${slug}`}> <Link href={`/blog/${slug}`} className="main-btn btn-hover">
<a className="main-btn btn-hover">Read More</a> Read More
</Link> </Link>
</div> </div>
</div> </div>
......
...@@ -19,9 +19,7 @@ export default function Blog({ posts, categories }) { ...@@ -19,9 +19,7 @@ export default function Blog({ posts, categories }) {
<h2>All Blog Posts</h2> <h2>All Blog Posts</h2>
<ul className="breadcrumb-nav"> <ul className="breadcrumb-nav">
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li>All blog posts</li> <li>All blog posts</li>
</ul> </ul>
......
...@@ -55,14 +55,10 @@ export default function BlogPost({ post, categories }) { ...@@ -55,14 +55,10 @@ export default function BlogPost({ post, categories }) {
<h2>{post.title}</h2> <h2>{post.title}</h2>
<ul className="breadcrumb-nav"> <ul className="breadcrumb-nav">
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/blog"> <Link href="/blog">Blog</Link>
<a>Blog</a>
</Link>
</li> </li>
<li>{post.title}</li> <li>{post.title}</li>
</ul> </ul>
...@@ -92,9 +88,7 @@ export default function BlogPost({ post, categories }) { ...@@ -92,9 +88,7 @@ export default function BlogPost({ post, categories }) {
{post.tags.map((tag) => ( {post.tags.map((tag) => (
<li key={tag.slug}> <li key={tag.slug}>
<Link href={`/blog/tag/${tag.slug}`}> <Link href={`/blog/tag/${tag.slug}`}>
<a> <i className="lni lni-tag"></i> {tag.name}
<i className="lni lni-tag"></i> {tag.name}
</a>
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -19,14 +19,10 @@ export default function Category({ posts, categories, slug }) { ...@@ -19,14 +19,10 @@ export default function Category({ posts, categories, slug }) {
<h2>Blog Posts by Category</h2> <h2>Blog Posts by Category</h2>
<ul className="breadcrumb-nav"> <ul className="breadcrumb-nav">
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/blog"> <Link href="/blog">Blog</Link>
<a>Blog</a>
</Link>
</li> </li>
<li>Category: {slug}</li> <li>Category: {slug}</li>
</ul> </ul>
......
...@@ -19,14 +19,10 @@ export default function Search({ posts, categories, query }) { ...@@ -19,14 +19,10 @@ export default function Search({ posts, categories, query }) {
<h2>Search Results</h2> <h2>Search Results</h2>
<ul className="breadcrumb-nav"> <ul className="breadcrumb-nav">
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/blog"> <Link href="/blog">Blog</Link>
<a>Blog</a>
</Link>
</li> </li>
<li>Search: &#34;{query}&#34;</li> <li>Search: &#34;{query}&#34;</li>
</ul> </ul>
......
...@@ -19,14 +19,10 @@ export default function Tag({ posts, categories, slug }) { ...@@ -19,14 +19,10 @@ export default function Tag({ posts, categories, slug }) {
<h2>Blog Posts by Tag</h2> <h2>Blog Posts by Tag</h2>
<ul className="breadcrumb-nav"> <ul className="breadcrumb-nav">
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/blog"> <Link href="/blog">Blog</Link>
<a>Blog</a>
</Link>
</li> </li>
<li>Tag: {slug}</li> <li>Tag: {slug}</li>
</ul> </ul>
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage title={title} slug={slug} url={coverImage.url} /> <CoverImage title={title} slug={slug} url={coverImage.url} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -31,8 +31,8 @@ const CoverImage = (props: CoverImageProps) => { ...@@ -31,8 +31,8 @@ const CoverImage = (props: CoverImageProps) => {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
const Header = () => { const Header = () => {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -24,8 +24,8 @@ const HeroPost = (props: HeroPostProps) => { ...@@ -24,8 +24,8 @@ const HeroPost = (props: HeroPostProps) => {
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -22,8 +22,8 @@ const PostPreview = (props: PostPreviewProps) => { ...@@ -22,8 +22,8 @@ const PostPreview = (props: PostPreviewProps) => {
<CoverImage slug={slug} title={title} url={coverImage.imgix_url} /> <CoverImage slug={slug} title={title} url={coverImage.imgix_url} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -17,8 +17,8 @@ export default function CoverImage({ title, responsiveImage, slug }) { ...@@ -17,8 +17,8 @@ export default function CoverImage({ title, responsiveImage, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -23,8 +23,8 @@ export default function HeroPost({ ...@@ -23,8 +23,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -21,8 +21,8 @@ export default function PostPreview({ ...@@ -21,8 +21,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -14,7 +14,7 @@ export const DotLink = ({ attrs: { href, target }, children }) => { ...@@ -14,7 +14,7 @@ export const DotLink = ({ attrs: { href, target }, children }) => {
{children} {children}
</a> </a>
) : ( ) : (
<Link href={href} target={target || '_self'}> <Link href={href} target={target || '_self'} legacyBehavior>
{children} {children}
</Link> </Link>
) )
......
...@@ -16,8 +16,8 @@ export default function CoverImage(props) { ...@@ -16,8 +16,8 @@ export default function CoverImage(props) {
return ( return (
<div className="-mx-5 sm:mx-0"> <div className="-mx-5 sm:mx-0">
{props.slug ? ( {props.slug ? (
<Link href={`/posts/${props.slug}`}> <Link href={`/posts/${props.slug}`} aria-label={props.title}>
<a aria-label={props.title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -32,8 +32,12 @@ export default function HeroPost({ ...@@ -32,8 +32,12 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-16 lg:col-gap-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-16 lg:col-gap-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link as={`/posts/${slug}`} href="/posts/[slug]"> <Link
<a className="hover:underline">{title}</a> as={`/posts/${slug}`}
href="/posts/[slug]"
className="hover:underline"
>
{title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -25,8 +25,8 @@ export default function PostPreview({ ...@@ -25,8 +25,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
{date !== 'now' ? ( {date !== 'now' ? (
......
...@@ -17,8 +17,8 @@ export default function CoverImage({ title, coverImage, slug }) { ...@@ -17,8 +17,8 @@ export default function CoverImage({ title, coverImage, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={slug}> <Link href={slug} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -21,12 +21,11 @@ export default function HeroPost({ ...@@ -21,12 +21,11 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={slug}> <Link
<a href={slug}
className="hover:underline" className="hover:underline"
dangerouslySetInnerHTML={{ __html: title }} dangerouslySetInnerHTML={{ __html: title }}
/> ></Link>
</Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
<Date dateString={date} /> <Date dateString={date} />
......
...@@ -17,12 +17,11 @@ export default function PostPreview({ ...@@ -17,12 +17,11 @@ export default function PostPreview({
<CoverImage title={title} coverImage={coverImage} slug={slug} /> <CoverImage title={title} coverImage={coverImage} slug={slug} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={slug}> <Link
<a href={slug}
className="hover:underline" className="hover:underline"
dangerouslySetInnerHTML={{ __html: title }} dangerouslySetInnerHTML={{ __html: title }}
></a> ></Link>
</Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
<Date dateString={date} /> <Date dateString={date} />
......
...@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) { ...@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts${slug}`}> <Link href={`/posts${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -31,12 +31,11 @@ export default function HeroPost({ ...@@ -31,12 +31,11 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts${slug}`}> <Link
<a href={`/posts${slug}`}
className="hover:underline" className="hover:underline"
dangerouslySetInnerHTML={{ __html: title }} dangerouslySetInnerHTML={{ __html: title }}
/> ></Link>
</Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
<Date dateString={date} /> <Date dateString={date} />
......
...@@ -29,8 +29,8 @@ export default function PostPreview({ ...@@ -29,8 +29,8 @@ export default function PostPreview({
)} )}
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts${slug}`}> <Link href={`/posts${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug, width, height }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug, width, height }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -25,8 +25,8 @@ export default function HeroPost({ ...@@ -25,8 +25,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -23,8 +23,8 @@ export default function PostPreview({ ...@@ -23,8 +23,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28"> <div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} url={coverImage.url} /> <CoverImage slug={slug} title={title} url={coverImage.url} />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg"> <div className="mb-4 text-lg">
......
...@@ -27,27 +27,26 @@ export default function Home({ posts }) { ...@@ -27,27 +27,26 @@ export default function Home({ posts }) {
posts.map((post) => ( posts.map((post) => (
<li key={post.id} className={styles.card}> <li key={post.id} className={styles.card}>
<Link href={`/post/${post.slug}`}> <Link href={`/post/${post.slug}`}>
<a> <h2>{post.title}</h2>
<h2>{post.title}</h2> <p>Read now &rarr;</p>
<p>Read now &rarr;</p>
</a>
</Link> </Link>
</li> </li>
)) ))
) : ( ) : (
<li className={`${styles.noposts} ${styles.card}`}> <li className={`${styles.noposts} ${styles.card}`}>
<Link href="http://localhost:8000"> <Link href="http://localhost:8000">
<a> <h2>No Posts</h2>
<h2>No Posts</h2> <p>Add one via the Admin UI &rarr;</p>
<p>Add one via the Admin UI &rarr;</p>
</a>
</Link> </Link>
</li> </li>
)} )}
</ul> </ul>
{process.env.NODE_ENV !== 'production' && ( {process.env.NODE_ENV !== 'production' && (
<Link href="/api/graphql?query=%7BallPosts%7Btitle%2Cslug%2Ccontent%7D%7D"> <Link
<a className={styles.playground}>Visit the graphql playground</a> href="/api/graphql?query=%7BallPosts%7Btitle%2Cslug%2Ccontent%7D%7D"
className={styles.playground}
>
Visit the graphql playground
</Link> </Link>
)} )}
</main> </main>
......
...@@ -6,9 +6,7 @@ export default function Home({ post }) { ...@@ -6,9 +6,7 @@ export default function Home({ post }) {
<div> <div>
<main style={{ margin: '3rem' }}> <main style={{ margin: '3rem' }}>
<div> <div>
<Link href="/"> <Link href="/">&larr; back home</Link>
<a>&larr; back home</a>
</Link>
</div> </div>
<h1>{post.title}</h1> <h1>{post.title}</h1>
<p>{post.content}</p> <p>{post.content}</p>
......
...@@ -17,8 +17,8 @@ export default function CoverImage({ title, src, slug }) { ...@@ -17,8 +17,8 @@ export default function CoverImage({ title, src, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} src={coverImage} /> <CoverImage slug={slug} title={title} src={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28"> <div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} url={coverImage} /> <CoverImage slug={slug} title={title} url={coverImage} />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg"> <div className="mb-4 text-lg">
......
...@@ -29,8 +29,8 @@ export default function CoverImage({ ...@@ -29,8 +29,8 @@ export default function CoverImage({
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{href ? ( {href ? (
<Link href={href}> <Link href={href} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -34,10 +34,8 @@ export default function HeroPost({ ...@@ -34,10 +34,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={href}> <Link href={href} className="hover:underline">
<a className="hover:underline"> <PrismicText field={title} />
<PrismicText field={title} />
</a>
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -33,10 +33,8 @@ export default function PostPreview({ ...@@ -33,10 +33,8 @@ export default function PostPreview({
<CoverImage title={asText(title)} href={href} image={coverImage} /> <CoverImage title={asText(title)} href={href} image={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={href}> <Link href={href} className="hover:underline">
<a className="hover:underline"> <PrismicText field={title} />
<PrismicText field={title} />
</a>
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -28,8 +28,8 @@ export default function CoverImage({ title, slug, image: source, priority }) { ...@@ -28,8 +28,8 @@ export default function CoverImage({ title, slug, image: source, priority }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28"> <div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} image={coverImage} /> <CoverImage slug={slug} title={title} image={coverImage} />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg"> <div className="mb-4 text-lg">
......
...@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => { ...@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link as={`/posts${slug}`} href="/posts[slug]"> <Link as={`/posts${slug}`} href="/posts[slug]" aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
const Header = () => { const Header = () => {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -29,8 +29,12 @@ const HeroPost = ({ ...@@ -29,8 +29,12 @@ const HeroPost = ({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-5xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-5xl leading-tight">
<Link as={`/posts${slug}`} href="/posts[slug]"> <Link
<a className="hover:underline">{title}</a> as={`/posts${slug}`}
href="/posts[slug]"
className="hover:underline"
>
{title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -27,8 +27,12 @@ const PostPreview = ({ ...@@ -27,8 +27,12 @@ const PostPreview = ({
<CoverImage slug={slug} title={title} src={coverImage} /> <CoverImage slug={slug} title={title} src={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link as={`/posts${slug}`} href="/posts[slug]"> <Link
<a className="hover:underline">{title}</a> as={`/posts${slug}`}
href="/posts[slug]"
className="hover:underline"
>
{title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -17,8 +17,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -17,8 +17,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={slug}> <Link href={slug} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} url={coverImage} /> <CoverImage slug={slug} title={title} url={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -21,8 +21,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -21,8 +21,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} url={coverImage.url} /> <CoverImage slug={slug} title={title} url={coverImage.url} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }) { ...@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={slug}> <Link href={slug} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} coverImage={coverImage} /> <CoverImage slug={slug} title={title} coverImage={coverImage} />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, src, slug, height, width }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, src, slug, height, width }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -25,8 +25,8 @@ export default function HeroPost({ ...@@ -25,8 +25,8 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
......
...@@ -23,8 +23,8 @@ export default function PostPreview({ ...@@ -23,8 +23,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
......
...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) { ...@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={slug}> <Link href={slug} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -19,8 +19,8 @@ export default function HeroPost({ ...@@ -19,8 +19,8 @@ export default function HeroPost({
<div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28"> <div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link href={slug}> <Link href={slug} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -17,8 +17,8 @@ export default function PostPreview({ ...@@ -17,8 +17,8 @@ export default function PostPreview({
<CoverImage slug={slug} title={title} url={coverImage.url} /> <CoverImage slug={slug} title={title} url={coverImage.url} />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={slug}> <Link href={slug} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg"> <div className="mb-4 text-lg">
......
...@@ -32,8 +32,8 @@ const CoverImage: React.FC<TCoverImage> = ({ ...@@ -32,8 +32,8 @@ const CoverImage: React.FC<TCoverImage> = ({
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="mt-8 mb-20 text-2xl font-bold leading-tight tracking-tight md:text-4xl md:tracking-tighter"> <h2 className="mt-8 mb-20 text-2xl font-bold leading-tight tracking-tight md:text-4xl md:tracking-tighter">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -25,8 +25,8 @@ export default function HeroPost({ ...@@ -25,8 +25,8 @@ export default function HeroPost({
<div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28"> <div className="mb-20 md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl leading-tight lg:text-6xl"> <h3 className="mb-4 text-4xl leading-tight lg:text-6xl">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg md:mb-0"> <div className="mb-4 text-lg md:mb-0">
......
...@@ -23,8 +23,8 @@ export default function PostPreview({ ...@@ -23,8 +23,8 @@ export default function PostPreview({
/> />
</div> </div>
<h3 className="mb-3 text-3xl leading-snug"> <h3 className="mb-3 text-3xl leading-snug">
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} className="hover:underline">
<a className="hover:underline">{title}</a> {title}
</Link> </Link>
</h3> </h3>
<div className="mb-4 text-lg"> <div className="mb-4 text-lg">
......
...@@ -27,8 +27,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) { ...@@ -27,8 +27,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) {
return ( return (
<div className="sm:mx-0"> <div className="sm:mx-0">
{slug ? ( {slug ? (
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`} aria-label={title}>
<a aria-label={title}>{image}</a> {image}
</Link> </Link>
) : ( ) : (
image image
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"> <h2 className="text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8">
<Link href="/"> <Link href="/" className="hover:underline">
<a className="hover:underline">Blog</a> Blog
</Link> </Link>
. .
</h2> </h2>
......
...@@ -21,12 +21,11 @@ export default function HeroPost({ ...@@ -21,12 +21,11 @@ export default function HeroPost({
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
<div> <div>
<h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> <h3 className="mb-4 text-4xl lg:text-6xl leading-tight">
<Link href={`/posts/${slug}`}> <Link
<a href={`/posts/${slug}`}
className="hover:underline" className="hover:underline"
dangerouslySetInnerHTML={{ __html: title }} dangerouslySetInnerHTML={{ __html: title }}
/> ></Link>
</Link>
</h3> </h3>
<div className="mb-4 md:mb-0 text-lg"> <div className="mb-4 md:mb-0 text-lg">
<Date dateString={date} /> <Date dateString={date} />
......
...@@ -19,12 +19,11 @@ export default function PostPreview({ ...@@ -19,12 +19,11 @@ export default function PostPreview({
)} )}
</div> </div>
<h3 className="text-3xl mb-3 leading-snug"> <h3 className="text-3xl mb-3 leading-snug">
<Link href={`/posts/${slug}`}> <Link
<a href={`/posts/${slug}`}
className="hover:underline" className="hover:underline"
dangerouslySetInnerHTML={{ __html: title }} dangerouslySetInnerHTML={{ __html: title }}
></a> ></Link>
</Link>
</h3> </h3>
<div className="text-lg mb-4"> <div className="text-lg mb-4">
<Date dateString={date} /> <Date dateString={date} />
......
...@@ -5,12 +5,12 @@ export default function Home() { ...@@ -5,12 +5,12 @@ export default function Home() {
<ul> <ul>
<li> <li>
<Link href="/b" as="/a"> <Link href="/b" as="/a">
<a>a</a> a
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/a" as="/b"> <Link href="/a" as="/b">
<a>b</a> b
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -5,12 +5,12 @@ export default function Home() { ...@@ -5,12 +5,12 @@ export default function Home() {
<ul> <ul>
<li> <li>
<Link href="/b" as="/a"> <Link href="/b" as="/a">
<a>a</a> a
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/a" as="/b"> <Link href="/a" as="/b">
<a>b</a> b
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -5,12 +5,12 @@ export default function Home() { ...@@ -5,12 +5,12 @@ export default function Home() {
<ul> <ul>
<li> <li>
<Link href="/b" as="/a"> <Link href="/b" as="/a">
<a>a</a> a
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/a" as="/b"> <Link href="/a" as="/b">
<a>b</a> b
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -6,12 +6,12 @@ export default function Home() { ...@@ -6,12 +6,12 @@ export default function Home() {
<ul> <ul>
<li> <li>
<Link href="/b" as="/a"> <Link href="/b" as="/a">
<a>a</a> a
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/a" as="/b"> <Link href="/a" as="/b">
<a>b</a> b
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -4,14 +4,10 @@ export default function Home() { ...@@ -4,14 +4,10 @@ export default function Home() {
return ( return (
<ul> <ul>
<li> <li>
<Link href="/a"> <Link href="/a">a</Link>
<a>a</a>
</Link>
</li> </li>
<li> <li>
<Link href="/b"> <Link href="/b">b</Link>
<a>b</a>
</Link>
</li> </li>
</ul> </ul>
) )
......
...@@ -5,12 +5,12 @@ export default function Home() { ...@@ -5,12 +5,12 @@ export default function Home() {
<ul> <ul>
<li> <li>
<Link href="/b" as="/a"> <Link href="/b" as="/a">
<a>a</a> a
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/a" as="/b"> <Link href="/a" as="/b">
<a>b</a> b
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -18,9 +18,7 @@ export default function IndexPage({ ...@@ -18,9 +18,7 @@ export default function IndexPage({
return ( return (
<> <>
<p>Next.js has {stars} ⭐️</p> <p>Next.js has {stars} ⭐️</p>
<Link href="/preact-stars"> <Link href="/preact-stars">How about preact?</Link>
<a>How about preact?</a>
</Link>
</> </>
) )
} }
...@@ -18,9 +18,7 @@ export default function PreactStarsPage({ ...@@ -18,9 +18,7 @@ export default function PreactStarsPage({
return ( return (
<> <>
<p>Preact has {stars} ⭐</p> <p>Preact has {stars} ⭐</p>
<Link href="/"> <Link href="/">I bet Next.js has more stars (?)</Link>
<a>I bet Next.js has more stars (?)</a>
</Link>
</> </>
) )
} }
...@@ -5,24 +5,16 @@ export default function Header() { ...@@ -5,24 +5,16 @@ export default function Header() {
<header> <header>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/post/first"> <Link href="/post/first">First Post</Link>
<a>First Post</a>
</Link>
</li> </li>
<li> <li>
<Link href="/post/second"> <Link href="/post/second">Second Post</Link>
<a>Second Post</a>
</Link>
</li> </li>
</ul> </ul>
</header> </header>
......
...@@ -12,14 +12,10 @@ export default function PostPage() { ...@@ -12,14 +12,10 @@ export default function PostPage() {
<h1>Post: {id}</h1> <h1>Post: {id}</h1>
<ul> <ul>
<li> <li>
<Link href={`/post/${id}/first-comment`}> <Link href={`/post/${id}/first-comment`}>First comment</Link>
<a>First comment</a>
</Link>
</li> </li>
<li> <li>
<Link href={`/post/${id}/second-comment`}> <Link href={`/post/${id}/second-comment`}>Second comment</Link>
<a>Second comment</a>
</Link>
</li> </li>
</ul> </ul>
</> </>
......
...@@ -10,7 +10,10 @@ export default function Index() { ...@@ -10,7 +10,10 @@ export default function Index() {
<hr className={styles.hr} /> <hr className={styles.hr} />
<p> <p>
The links below are examples of{' '} The links below are examples of{' '}
<Link href="https://nextjs.org/docs/api-reference/next.config.js/headers"> <Link
href="https://nextjs.org/docs/api-reference/next.config.js/headers"
legacyBehavior
>
<> <>
custom <Code>headers</Code> custom <Code>headers</Code>
</> </>
......
...@@ -3,10 +3,7 @@ import Link from 'next/link' ...@@ -3,10 +3,7 @@ import Link from 'next/link'
export default function IndexPage() { export default function IndexPage() {
return ( return (
<div> <div>
Hello World.{' '} Hello World. <Link href="/about">About</Link>
<Link href="/about">
<a>About</a>
</Link>
</div> </div>
) )
} }
...@@ -17,7 +17,12 @@ export default function LocaleSwitcher() { ...@@ -17,7 +17,12 @@ export default function LocaleSwitcher() {
const { pathname, query, asPath } = router const { pathname, query, asPath } = router
return ( return (
<li key={locale}> <li key={locale}>
<Link href={{ pathname, query }} as={asPath} locale={locale}> <Link
href={{ pathname, query }}
as={asPath}
locale={locale}
legacyBehavior
>
{locale} {locale}
</Link> </Link>
</li> </li>
......
...@@ -36,34 +36,22 @@ const Index = () => ( ...@@ -36,34 +36,22 @@ const Index = () => (
</p> </p>
<ul> <ul>
<li> <li>
<Link href="/responsive"> <Link href="/responsive">Responsive to viewport</Link>
<a>Responsive to viewport</a>
</Link>
</li> </li>
<li> <li>
<Link href="/fill"> <Link href="/fill">Fill dimensions of parent element</Link>
<a>Fill dimensions of parent element</a>
</Link>
</li> </li>
<li> <li>
<Link href="/placeholder"> <Link href="/placeholder">Blur-up placeholder</Link>
<a>Blur-up placeholder</a>
</Link>
</li> </li>
<li> <li>
<Link href="/shimmer"> <Link href="/shimmer">Shimmer placeholder</Link>
<a>Shimmer placeholder</a>
</Link>
</li> </li>
<li> <li>
<Link href="/color"> <Link href="/color">Color placeholder</Link>
<a>Color placeholder</a>
</Link>
</li> </li>
<li> <li>
<Link href="/background"> <Link href="/background">Text on background image</Link>
<a>Text on background image</a>
</Link>
</li> </li>
</ul> </ul>
<hr className={styles.hr} /> <hr className={styles.hr} />
......
...@@ -40,29 +40,19 @@ const Index = () => ( ...@@ -40,29 +40,19 @@ const Index = () => (
</p> </p>
<ul> <ul>
<li> <li>
<Link href="/layout-intrinsic"> <Link href="/layout-intrinsic">layout="intrinsic"</Link>
<a>layout="intrinsic"</a>
</Link>
</li> </li>
<li> <li>
<Link href="/layout-responsive"> <Link href="/layout-responsive">layout="responsive"</Link>
<a>layout="responsive"</a>
</Link>
</li> </li>
<li> <li>
<Link href="/layout-fixed"> <Link href="/layout-fixed">layout="fixed"</Link>
<a>layout="fixed"</a>
</Link>
</li> </li>
<li> <li>
<Link href="/layout-fill"> <Link href="/layout-fill">layout="fill"</Link>
<a>layout="fill"</a>
</Link>
</li> </li>
<li> <li>
<Link href="/background"> <Link href="/background">background demo</Link>
<a>background demo</a>
</Link>
</li> </li>
</ul> </ul>
<hr className={styles.hr} /> <hr className={styles.hr} />
...@@ -81,18 +71,16 @@ const Index = () => ( ...@@ -81,18 +71,16 @@ const Index = () => (
</p> </p>
<ul> <ul>
<li> <li>
<Link href="/placeholder"> <Link href="/placeholder">placeholder="blur"</Link>
<a>placeholder="blur"</a>
</Link>
</li> </li>
<li> <li>
<Link href="/shimmer"> <Link href="/shimmer">
<a>placeholder="blur" with animated shimmer blurDataURL</a> placeholder="blur" with animated shimmer blurDataURL
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/color"> <Link href="/color">
<a>placeholder="blur" with solid color blurDataURL</a> placeholder="blur" with solid color blurDataURL
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -5,15 +5,9 @@ export default function Sidebar() { ...@@ -5,15 +5,9 @@ export default function Sidebar() {
return ( return (
<nav className={styles.nav}> <nav className={styles.nav}>
<input className={styles.input} placeholder="Search..." /> <input className={styles.input} placeholder="Search..." />
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a> <Link href="/about">About</Link>
</Link> <Link href="/contact">Contact</Link>
<Link href="/about">
<a>About</a>
</Link>
<Link href="/contact">
<a>Contact</a>
</Link>
</nav> </nav>
) )
} }
...@@ -7,17 +7,17 @@ const Home: NextPage = () => { ...@@ -7,17 +7,17 @@ const Home: NextPage = () => {
<h1>Index</h1> <h1>Index</h1>
<p> <p>
<Link href="/about" passHref> <Link href="/about" passHref>
<a>Go to about page (will redirect)</a> Go to about page (will redirect)
</Link> </Link>
</p> </p>
<p> <p>
<Link href="/another" passHref> <Link href="/another" passHref>
<a>Go to another page (will rewrite)</a> Go to another page (will rewrite)
</Link> </Link>
</p> </p>
<p> <p>
<Link href="/about2" passHref> <Link href="/about2" passHref>
<a>Go to about 2 page (no redirect or rewrite)</a> Go to about 2 page (no redirect or rewrite)
</Link> </Link>
</p> </p>
</div> </div>
......
...@@ -24,18 +24,14 @@ export default function IndexPage() { ...@@ -24,18 +24,14 @@ export default function IndexPage() {
</p> </p>
<div className={styles.grid}> <div className={styles.grid}>
<Link href="/js-form"> <Link href="/js-form" className={styles.card}>
<a className={styles.card}> <h2>Form with JavaScript &rarr;</h2>
<h2>Form with JavaScript &rarr;</h2> <p>Learn to handle forms with JavaScript in Next.js.</p>
<p>Learn to handle forms with JavaScript in Next.js.</p>
</a>
</Link> </Link>
<Link href="/no-js-form"> <Link href="/no-js-form" className={styles.card}>
<a className={styles.card}> <h2>Form without JavaScript &rarr;</h2>
<h2>Form without JavaScript &rarr;</h2> <p>Learn to handle forms without JavaScript in Next.js.</p>
<p>Learn to handle forms without JavaScript in Next.js.</p>
</a>
</Link> </Link>
</div> </div>
</main> </main>
......
...@@ -37,11 +37,7 @@ export default function PageWithJSbasedForm() { ...@@ -37,11 +37,7 @@ export default function PageWithJSbasedForm() {
return ( return (
<div className="container"> <div className="container">
<h1 className={styles.title}> <h1 className={styles.title}>
Form{' '} Form <Link href="/">with</Link> JavaScript.
<Link href="/">
<a>with</a>
</Link>{' '}
JavaScript.
</h1> </h1>
<p className={styles.description}> <p className={styles.description}>
......
...@@ -5,11 +5,7 @@ export default function Form() { ...@@ -5,11 +5,7 @@ export default function Form() {
return ( return (
<div className="container"> <div className="container">
<h1 className={styles.title}> <h1 className={styles.title}>
Form{' '} Form <Link href="/">without</Link> JavaScript.
<Link href="/">
<a>without</a>
</Link>{' '}
JavaScript.
</h1> </h1>
<p className={styles.description}> <p className={styles.description}>
Get started by looking at{' '} Get started by looking at{' '}
......
...@@ -10,7 +10,10 @@ export default function Index() { ...@@ -10,7 +10,10 @@ export default function Index() {
<hr className={styles.hr} /> <hr className={styles.hr} />
<p> <p>
The links below are{' '} The links below are{' '}
<Link href="https://nextjs.org/docs/api-reference/next.config.js/redirects"> <Link
href="https://nextjs.org/docs/api-reference/next.config.js/redirects"
legacyBehavior
>
<> <>
custom <Code>redirects</Code> custom <Code>redirects</Code>
</> </>
......
...@@ -10,7 +10,10 @@ export default function Index() { ...@@ -10,7 +10,10 @@ export default function Index() {
<hr className={styles.hr} /> <hr className={styles.hr} />
<p> <p>
The links below are{' '} The links below are{' '}
<Link href="https://nextjs.org/docs/api-reference/next.config.js/rewrites"> <Link
href="https://nextjs.org/docs/api-reference/next.config.js/rewrites"
legacyBehavior
>
<> <>
custom <Code>rewrites</Code> custom <Code>rewrites</Code>
</> </>
......
...@@ -6,19 +6,13 @@ export default function IndexPage() { ...@@ -6,19 +6,13 @@ export default function IndexPage() {
Hello World.{' '} Hello World.{' '}
<ul> <ul>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/ssr"> <Link href="/ssr">SSR</Link>
<a>SSR</a>
</Link>
</li> </li>
<li> <li>
<Link href="/ssg"> <Link href="/ssg">SSG</Link>
<a>SSG</a>
</Link>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -29,10 +29,8 @@ export default function Home() { ...@@ -29,10 +29,8 @@ export default function Home() {
return ( return (
<div style={content}> <div style={content}>
<div className="text-center mb-5"> <div className="text-center mb-5">
<Link href="#"> <Link href="#" className="logo mr-0">
<a className="logo mr-0"> <SmileFilled style={{ fontSize: 48 }} />
<SmileFilled style={{ fontSize: 48 }} />
</a>
</Link> </Link>
<p className="mb-0 mt-3 text-disabled">Welcome to the world !</p> <p className="mb-0 mt-3 text-disabled">Welcome to the world !</p>
......
...@@ -6,13 +6,13 @@ export default function Nav() { ...@@ -6,13 +6,13 @@ export default function Nav() {
return ( return (
<header> <header>
<Link href="/"> <Link href="/" legacyBehavior>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link href="/apollo"> <Link href="/apollo" legacyBehavior>
<a className={pathname === '/apollo' ? 'is-active' : ''}>Apollo</a> <a className={pathname === '/apollo' ? 'is-active' : ''}>Apollo</a>
</Link> </Link>
<Link href="/redux"> <Link href="/redux" legacyBehavior>
<a className={pathname === '/redux' ? 'is-active' : ''}>Redux</a> <a className={pathname === '/redux' ? 'is-active' : ''}>Redux</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -54,6 +54,7 @@ export default function Actor() { ...@@ -54,6 +54,7 @@ export default function Actor() {
as={{ as={{
pathname: `/movie/${encodeURIComponent(movie.title)}`, pathname: `/movie/${encodeURIComponent(movie.title)}`,
}} }}
legacyBehavior
> >
<a>{movie.title}</a> <a>{movie.title}</a>
</Link> </Link>
...@@ -63,7 +64,7 @@ export default function Actor() { ...@@ -63,7 +64,7 @@ export default function Actor() {
</div> </div>
<div className="back"> <div className="back">
<Link href="/"> <Link href="/" legacyBehavior>
<a>🔙 Go Back</a> <a>🔙 Go Back</a>
</Link> </Link>
</div> </div>
......
...@@ -62,6 +62,7 @@ export default function Home() { ...@@ -62,6 +62,7 @@ export default function Home() {
as={{ as={{
pathname: `/movie/${encodeURIComponent(movie.title)}`, pathname: `/movie/${encodeURIComponent(movie.title)}`,
}} }}
legacyBehavior
> >
<a className="link">{movie.title}</a> <a className="link">{movie.title}</a>
</Link> </Link>
...@@ -86,6 +87,7 @@ export default function Home() { ...@@ -86,6 +87,7 @@ export default function Home() {
actor.name actor.name
)}`, )}`,
}} }}
legacyBehavior
> >
<a className="link">{actor.name}</a> <a className="link">{actor.name}</a>
</Link> </Link>
......
...@@ -68,7 +68,7 @@ export default function Movie() { ...@@ -68,7 +68,7 @@ export default function Movie() {
</div> </div>
<div className="back"> <div className="back">
<Link href="/"> <Link href="/" legacyBehavior>
<a>🔙 Go Back</a> <a>🔙 Go Back</a>
</Link> </Link>
</div> </div>
......
...@@ -6,18 +6,18 @@ export default function Header() { ...@@ -6,18 +6,18 @@ export default function Header() {
return ( return (
<header> <header>
<Link href="/"> <Link href="/" legacyBehavior>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link href="/about"> <Link href="/about" legacyBehavior>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a> <a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link> </Link>
<Link href="/client-only"> <Link href="/client-only" legacyBehavior>
<a className={pathname === '/client-only' ? 'is-active' : ''}> <a className={pathname === '/client-only' ? 'is-active' : ''}>
Client-Only Client-Only
</a> </a>
</Link> </Link>
<Link href="/ssr"> <Link href="/ssr" legacyBehavior>
<a className={pathname === '/ssr' ? 'is-active' : ''}>SSR</a> <a className={pathname === '/ssr' ? 'is-active' : ''}>SSR</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -25,9 +25,7 @@ export default connect( ...@@ -25,9 +25,7 @@ export default connect(
<h1>{this.props.title}</h1> <h1>{this.props.title}</h1>
<Clock lastUpdate={this.props.lastUpdate} light={this.props.light} /> <Clock lastUpdate={this.props.lastUpdate} light={this.props.light} />
<nav> <nav>
<Link href={this.props.linkTo}> <Link href={this.props.linkTo}>Navigate</Link>
<a>Navigate</a>
</Link>
</nav> </nav>
</div> </div>
) )
......
...@@ -12,11 +12,9 @@ import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs' ...@@ -12,11 +12,9 @@ import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs'
const Header = () => ( const Header = () => (
<header className={styles.header}> <header className={styles.header}>
<div className={styles.left}> <div className={styles.left}>
<Link href="/"> <Link href="/" className={styles.logo}>
<a className={styles.logo}> <Image src="/logo.svg" width="32" height="32" alt="Logo" />
<Image src="/logo.svg" width="32" height="32" alt="Logo" /> <span className={styles.appName}>Your application</span>
<span className={styles.appName}>Your application</span>
</a>
</Link> </Link>
</div> </div>
<div className={styles.right}> <div className={styles.right}>
......
...@@ -44,11 +44,8 @@ const MyApp = ({ Component, pageProps }) => { ...@@ -44,11 +44,8 @@ const MyApp = ({ Component, pageProps }) => {
<SignedOut> <SignedOut>
<main> <main>
<p> <p>
Please{' '} Please <Link href="/sign-in">sign in</Link> to access this
<Link href="/sign-in"> page.
<a>sign in</a>
</Link>{' '}
to access this page.
</p> </p>
</main> </main>
</SignedOut> </SignedOut>
......
...@@ -5,38 +5,34 @@ import styles from '../styles/Home.module.css' ...@@ -5,38 +5,34 @@ import styles from '../styles/Home.module.css'
import { SignedIn, SignedOut } from '@clerk/nextjs' import { SignedIn, SignedOut } from '@clerk/nextjs'
const ClerkFeatures = () => ( const ClerkFeatures = () => (
<Link href="/user"> <Link href="/user" className={styles.cardContent}>
<a className={styles.cardContent}> <img src="/icons/layout.svg" />
<img src="/icons/layout.svg" /> <div>
<div> <h3>Explore features provided by Clerk</h3>
<h3>Explore features provided by Clerk</h3> <p>
<p> Interact with the user button, user profile, and more to preview what
Interact with the user button, user profile, and more to preview what your users will see
your users will see </p>
</p> </div>
</div> <div className={styles.arrow}>
<div className={styles.arrow}> <img src="/icons/arrow-right.svg" />
<img src="/icons/arrow-right.svg" /> </div>
</div>
</a>
</Link> </Link>
) )
const SignupLink = () => ( const SignupLink = () => (
<Link href="/sign-up"> <Link href="/sign-up" className={styles.cardContent}>
<a className={styles.cardContent}> <img src="/icons/user-plus.svg" />
<img src="/icons/user-plus.svg" /> <div>
<div> <h3>Sign up for an account</h3>
<h3>Sign up for an account</h3> <p>
<p> Sign up and sign in to explore all the features provided by Clerk
Sign up and sign in to explore all the features provided by Clerk out-of-the-box
out-of-the-box </p>
</p> </div>
</div> <div className={styles.arrow}>
<div className={styles.arrow}> <img src="/icons/arrow-right.svg" />
<img src="/icons/arrow-right.svg" /> </div>
</div>
</a>
</Link> </Link>
) )
...@@ -72,20 +68,23 @@ const Main = () => ( ...@@ -72,20 +68,23 @@ const Main = () => (
</div> </div>
<div className={styles.card}> <div className={styles.card}>
<Link href="https://dashboard.clerk.dev"> <Link
<a target="_blank" rel="noreferrer" className={styles.cardContent}> href="https://dashboard.clerk.dev"
<img src="/icons/settings.svg" /> target="_blank"
<div> rel="noreferrer"
<h3>Configure settings for your app</h3> className={styles.cardContent}
<p> >
Visit Clerk to manage instances and configure settings for user <img src="/icons/settings.svg" />
management, theme, and more <div>
</p> <h3>Configure settings for your app</h3>
</div> <p>
<div className={styles.arrow}> Visit Clerk to manage instances and configure settings for user
<img src="/icons/arrow-right.svg" /> management, theme, and more
</div> </p>
</a> </div>
<div className={styles.arrow}>
<img src="/icons/arrow-right.svg" />
</div>
</Link> </Link>
</div> </div>
</div> </div>
...@@ -93,15 +92,21 @@ const Main = () => ( ...@@ -93,15 +92,21 @@ const Main = () => (
<APIRequest /> <APIRequest />
<div className={styles.links}> <div className={styles.links}>
<Link href="https://docs.clerk.dev"> <Link
<a target="_blank" rel="noreferrer" className={styles.link}> href="https://docs.clerk.dev"
<span className={styles.linkText}>Read Clerk documentation</span> target="_blank"
</a> rel="noreferrer"
className={styles.link}
>
<span className={styles.linkText}>Read Clerk documentation</span>
</Link> </Link>
<Link href="https://nextjs.org/docs"> <Link
<a target="_blank" rel="noreferrer" className={styles.link}> href="https://nextjs.org/docs"
<span className={styles.linkText}>Read NextJS documentation</span> target="_blank"
</a> rel="noreferrer"
className={styles.link}
>
<span className={styles.linkText}>Read NextJS documentation</span>
</Link> </Link>
</div> </div>
</main> </main>
......
...@@ -16,9 +16,7 @@ export default function Home({ posts }) { ...@@ -16,9 +16,7 @@ export default function Home({ posts }) {
<ul className={utilStyles.list}> <ul className={utilStyles.list}>
{posts.map(({ slug, date, title }) => ( {posts.map(({ slug, date, title }) => (
<li className={utilStyles.listItem} key={slug}> <li className={utilStyles.listItem} key={slug}>
<Link href={`/posts/${slug}`}> <Link href={`/posts/${slug}`}>{title}</Link>
<a>{title}</a>
</Link>
<br /> <br />
<small className={utilStyles.lightText}>{date}</small> <small className={utilStyles.lightText}>{date}</small>
</li> </li>
......
...@@ -23,9 +23,7 @@ const AboutPage = () => { ...@@ -23,9 +23,7 @@ const AboutPage = () => {
<button onClick={handleIncrease}>Increase</button> <button onClick={handleIncrease}>Increase</button>
<button onClick={handleIncrease15}>Increase By 15</button> <button onClick={handleIncrease15}>Increase By 15</button>
<p> <p>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</p> </p>
</> </>
) )
......
...@@ -22,9 +22,7 @@ const IndexPage = () => { ...@@ -22,9 +22,7 @@ const IndexPage = () => {
<button onClick={handleIncrease}>Increase</button> <button onClick={handleIncrease}>Increase</button>
<button onClick={handleDecrease}>Decrease</button> <button onClick={handleDecrease}>Decrease</button>
<p> <p>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</p> </p>
</> </>
) )
......
...@@ -6,22 +6,22 @@ const Header = (props) => ( ...@@ -6,22 +6,22 @@ const Header = (props) => (
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/login"> <Link href="/login" legacyBehavior>
<a>Login</a> <a>Login</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/signup"> <Link href="/signup" legacyBehavior>
<a>Signup</a> <a>Signup</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/profile"> <Link href="/profile" legacyBehavior>
<a>Profile</a> <a>Profile</a>
</Link> </Link>
</li> </li>
......
...@@ -7,9 +7,7 @@ export default function About() { ...@@ -7,9 +7,7 @@ export default function About() {
<main className={styles.main}> <main className={styles.main}>
<h1>About Page</h1> <h1>About Page</h1>
<p className={styles.description}> <p className={styles.description}>
<Link href="/"> <Link href="/">&larr; Go Back</Link>
<a>&larr; Go Back</a>
</Link>
</p> </p>
</main> </main>
</div> </div>
......
...@@ -23,11 +23,9 @@ export default function Home() { ...@@ -23,11 +23,9 @@ export default function Home() {
</p> </p>
<div className={styles.grid}> <div className={styles.grid}>
<Link href="/about"> <Link href="/about" className={styles.card}>
<a className={styles.card}> <h2>About Page &rarr;</h2>
<h2>About Page &rarr;</h2> <p>Cypress will test if this link is working.</p>
<p>Cypress will test if this link is working.</p>
</a>
</Link> </Link>
<a href="https://nextjs.org/docs" className={styles.card}> <a href="https://nextjs.org/docs" className={styles.card}>
......
...@@ -3,12 +3,12 @@ import Link from 'next/link' ...@@ -3,12 +3,12 @@ import Link from 'next/link'
export default function Header() { export default function Header() {
return ( return (
<div> <div>
<Link href="/"> <Link href="/" style={{ marginRight: 10 }}>
<a style={{ marginRight: 10 }}>Home</a> Home
</Link> </Link>
<Link href="/about"> <Link href="/about" style={{ marginRight: 10 }}>
<a style={{ marginRight: 10 }}>About</a> About
</Link> </Link>
</div> </div>
) )
......
...@@ -5,15 +5,15 @@ const Header: React.FC = () => { ...@@ -5,15 +5,15 @@ const Header: React.FC = () => {
return ( return (
<nav> <nav>
<div className="left"> <div className="left">
<Link href="/"> <Link href="/" legacyBehavior>
<a>Blog</a> <a>Blog</a>
</Link> </Link>
<Link href="/drafts"> <Link href="/drafts" legacyBehavior>
<a>Drafts</a> <a>Drafts</a>
</Link> </Link>
</div> </div>
<div className="right"> <div className="right">
<Link href="/create"> <Link href="/create" legacyBehavior>
<a>+ New draft</a> <a>+ New draft</a>
</Link> </Link>
</div> </div>
......
...@@ -5,7 +5,7 @@ import { PostProps } from '../pages/blog/[id]' ...@@ -5,7 +5,7 @@ import { PostProps } from '../pages/blog/[id]'
const Post: React.FC<{ post: PostProps }> = ({ post }) => { const Post: React.FC<{ post: PostProps }> = ({ post }) => {
return ( return (
<Link href={`/blog/${post.id}`} passHref> <Link href={`/blog/${post.id}`} passHref legacyBehavior>
<div> <div>
<h2>{post.title}</h2> <h2>{post.title}</h2>
<small>By {post.authorName}</small> <small>By {post.authorName}</small>
......
...@@ -54,7 +54,7 @@ const Draft: React.FC = () => { ...@@ -54,7 +54,7 @@ const Draft: React.FC = () => {
type="submit" type="submit"
value="Create" value="Create"
/> />
<Link href="/"> <Link href="/" legacyBehavior>
<a className="back">Cancel</a> <a className="back">Cancel</a>
</Link> </Link>
</form> </form>
......
...@@ -16,17 +16,8 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => ( ...@@ -16,17 +16,8 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</Head> </Head>
<header> <header>
<nav> <nav>
<Link href="/"> <Link href="/">Home</Link> | <Link href="/about">About</Link> |{' '}
<a>Home</a> <Link href="/initial-props">With Initial Props</Link>
</Link>{' '}
|{' '}
<Link href="/about">
<a>About</a>
</Link>{' '}
|{' '}
<Link href="/initial-props">
<a>With Initial Props</a>
</Link>
</nav> </nav>
</header> </header>
{children} {children}
......
...@@ -9,9 +9,7 @@ type Props = { ...@@ -9,9 +9,7 @@ type Props = {
const ListItem = ({ data }: Props) => ( const ListItem = ({ data }: Props) => (
<Link href="/detail/[id]" as={`/detail/${data.id}`}> <Link href="/detail/[id]" as={`/detail/${data.id}`}>
<a> {data.id}:{data.name}
{data.id}: {data.name}
</a>
</Link> </Link>
) )
......
...@@ -6,9 +6,7 @@ const AboutPage = () => ( ...@@ -6,9 +6,7 @@ const AboutPage = () => (
<h1>About</h1> <h1>About</h1>
<p>This is the about page</p> <p>This is the about page</p>
<p> <p>
<Link href="/"> <Link href="/">Go home</Link>
<a>Go home</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -23,9 +23,7 @@ const IndexPage = () => { ...@@ -23,9 +23,7 @@ const IndexPage = () => {
<h1>Hello Next.js 👋</h1> <h1>Hello Next.js 👋</h1>
<button onClick={onSayHiClick}>Say hi to electron</button> <button onClick={onSayHiClick}>Say hi to electron</button>
<p> <p>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -18,9 +18,7 @@ const WithInitialProps = ({ items }: Props) => { ...@@ -18,9 +18,7 @@ const WithInitialProps = ({ items }: Props) => {
<p>You are currently on: {router.pathname}</p> <p>You are currently on: {router.pathname}</p>
<List items={items} /> <List items={items} />
<p> <p>
<Link href="/"> <Link href="/">Go home</Link>
<a>Go home</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -18,9 +18,7 @@ export default function Home() { ...@@ -18,9 +18,7 @@ export default function Home() {
<p> <p>
Click the link below to navigate to another page. Click the link below to navigate to another page.
<br /> <br />
<Link href="/navigation"> <Link href="/navigation">Navigation page</Link>
<a>Navigation page</a>
</Link>
</p> </p>
</div> </div>
) )
......
...@@ -7,9 +7,7 @@ export default function NavigationPage() { ...@@ -7,9 +7,7 @@ export default function NavigationPage() {
Navigating between pages will trigger a pageview event in Facebook Navigating between pages will trigger a pageview event in Facebook
Pixel, but will not reinitialize the pixel. Pixel, but will not reinitialize the pixel.
</p> </p>
<Link href="/"> <Link href="/">Return to home</Link>
<a>Return to home</a>
</Link>
</div> </div>
) )
} }
...@@ -20,8 +20,9 @@ const CustomLink: React.FC<PropsWithChildren<{ to: string }>> = ({ ...@@ -20,8 +20,9 @@ const CustomLink: React.FC<PropsWithChildren<{ to: string }>> = ({
query: { cacheStrategy }, query: { cacheStrategy },
}} }}
scroll={false} scroll={false}
className={className}
> >
<a className={className}>{children}</a> {children}
</Link> </Link>
</div> </div>
) )
......
...@@ -3,11 +3,11 @@ import Link from 'next/link' ...@@ -3,11 +3,11 @@ import Link from 'next/link'
const Header = ({ pathname }) => ( const Header = ({ pathname }) => (
<header> <header>
<Link href="/"> <Link href="/" className={pathname === '/' ? 'is-active' : ''}>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> Home
</Link>{' '} </Link>{' '}
<Link href="/about"> <Link href="/about" className={pathname === '/about' ? 'is-active' : ''}>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a> About
</Link> </Link>
</header> </header>
) )
......
...@@ -45,7 +45,7 @@ export default function Home() { ...@@ -45,7 +45,7 @@ export default function Home() {
<p className="description"> <p className="description">
Please press the link below after adding the user Please press the link below after adding the user
</p> </p>
<Link href={`/profile/${profile.username}`} passHref> <Link href={`/profile/${profile.username}`} passHref legacyBehavior>
<a>Go to SSR Page</a> <a>Go to SSR Page</a>
</Link> </Link>
</main> </main>
......
...@@ -5,17 +5,8 @@ function MyApp({ Component, pageProps }) { ...@@ -5,17 +5,8 @@ function MyApp({ Component, pageProps }) {
<> <>
<header> <header>
<nav> <nav>
<Link href="/"> <Link href="/">Home</Link>|<Link href="/about">About</Link>|
<a>Home</a> <Link href="/contact">Contact</Link>
</Link>
|
<Link href="/about">
<a>About</a>
</Link>
|
<Link href="/contact">
<a>Contact</a>
</Link>
</nav> </nav>
</header> </header>
......
...@@ -33,7 +33,12 @@ const Thumbnail = ({ id, i }) => ( ...@@ -33,7 +33,12 @@ const Thumbnail = ({ id, i }) => (
variants={frameVariants} variants={frameVariants}
transition={transition} transition={transition}
> >
<Link href="/image/[index]" as={`/image/${i}`} scroll={false}> <Link
href="/image/[index]"
as={`/image/${i}`}
scroll={false}
legacyBehavior
>
<motion.img <motion.img
src={`https://images.unsplash.com/${id}?auto=format&fit=crop&w=1500`} src={`https://images.unsplash.com/${id}?auto=format&fit=crop&w=1500`}
alt="The Barbican" alt="The Barbican"
......
...@@ -32,9 +32,7 @@ const SingleImage = ({ index }) => ( ...@@ -32,9 +32,7 @@ const SingleImage = ({ index }) => (
alt="The Barbican" alt="The Barbican"
/> />
<motion.div className="back" variants={backVariants}> <motion.div className="back" variants={backVariants}>
<Link href="/"> <Link href="/">← Back</Link>
<a>← Back</a>
</Link>
</motion.div> </motion.div>
</motion.div> </motion.div>
<style> <style>
......
...@@ -6,19 +6,13 @@ export default function Header() { ...@@ -6,19 +6,13 @@ export default function Header() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/contact"> <Link href="/contact">Contact</Link>
<a>Contact</a>
</Link>
</li> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -6,19 +6,13 @@ export default function Header() { ...@@ -6,19 +6,13 @@ export default function Header() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/contact"> <Link href="/contact">Contact</Link>
<a>Contact</a>
</Link>
</li> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -6,10 +6,10 @@ export default function Header() { ...@@ -6,10 +6,10 @@ export default function Header() {
return ( return (
<header> <header>
<Link href="/"> <Link href="/" legacyBehavior>
<a className={pathname === '/' ? 'is-active' : ''}>Home</a> <a className={pathname === '/' ? 'is-active' : ''}>Home</a>
</Link> </Link>
<Link href="/about"> <Link href="/about" legacyBehavior>
<a className={pathname === '/about' ? 'is-active' : ''}>About</a> <a className={pathname === '/about' ? 'is-active' : ''}>About</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -3,9 +3,7 @@ export default function About() { ...@@ -3,9 +3,7 @@ export default function About() {
return ( return (
<div> <div>
<h3>This is the /about page. </h3> <h3>This is the /about page. </h3>
<Link href="/"> <Link href="/">&larr; Back home</Link>
<a> &larr; Back home</a>
</Link>
</div> </div>
) )
} }
...@@ -3,9 +3,7 @@ export default function Home() { ...@@ -3,9 +3,7 @@ export default function Home() {
return ( return (
<div> <div>
<h3>Hello World.</h3> <h3>Hello World.</h3>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</div> </div>
) )
} }
...@@ -10,16 +10,12 @@ export default function Navigation() { ...@@ -10,16 +10,12 @@ export default function Navigation() {
return ( return (
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', gap: 10 }}> <div style={{ display: 'flex', gap: 10 }}>
<Link href="/"> <Link href="/">{t('index')}</Link>
<a>{t('index')}</a> <Link href="/about">{t('about')}</Link>
</Link>
<Link href="/about">
<a>{t('about')}</a>
</Link>
</div> </div>
{otherLocale && ( {otherLocale && (
<Link href={route} locale={otherLocale}> <Link href={route} locale={otherLocale}>
<a>{t('switchLocale', { locale: otherLocale })}</a> {t('switchLocale', { locale: otherLocale })}
</Link> </Link>
)} )}
</div> </div>
......
...@@ -20,7 +20,7 @@ const HomePage = () => { ...@@ -20,7 +20,7 @@ const HomePage = () => {
<h3>{i18n.t('intro.description')}</h3> <h3>{i18n.t('intro.description')}</h3>
<div>Current locale: {i18n.activeLocale}</div> <div>Current locale: {i18n.activeLocale}</div>
<Link href="/[lng]" as="/de"> <Link href="/[lng]" as="/de">
<a>Use client-side routing to change language to 'de'</a> Use client-side routing to change language to 'de'
</Link> </Link>
</div> </div>
) )
......
...@@ -13,13 +13,13 @@ export default function Header() { ...@@ -13,13 +13,13 @@ export default function Header() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
</li> </li>
{user?.isLoggedIn === false && ( {user?.isLoggedIn === false && (
<li> <li>
<Link href="/login"> <Link href="/login" legacyBehavior>
<a>Login</a> <a>Login</a>
</Link> </Link>
</li> </li>
...@@ -27,7 +27,7 @@ export default function Header() { ...@@ -27,7 +27,7 @@ export default function Header() {
{user?.isLoggedIn === true && ( {user?.isLoggedIn === true && (
<> <>
<li> <li>
<Link href="/profile-sg"> <Link href="/profile-sg" legacyBehavior>
<a> <a>
<span <span
style={{ style={{
...@@ -49,7 +49,7 @@ export default function Header() { ...@@ -49,7 +49,7 @@ export default function Header() {
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/profile-ssr"> <Link href="/profile-ssr" legacyBehavior>
<a>Profile (Server-side Rendering)</a> <a>Profile (Server-side Rendering)</a>
</Link> </Link>
</li> </li>
......
...@@ -12,10 +12,12 @@ export default function LangSwitcher() { ...@@ -12,10 +12,12 @@ export default function LangSwitcher() {
const otherLocale = locales?.find((cur) => cur !== locale) const otherLocale = locales?.find((cur) => cur !== locale)
return ( return (
<Link href={route} locale={otherLocale}> <Link
<a style={{ display: 'block', marginBottom: '20px' }}> href={route}
{availableLanguageNames[otherLocale]} locale={otherLocale}
</a> style={{ display: 'block', marginBottom: '20px' }}
>
{availableLanguageNames[otherLocale]}
</Link> </Link>
) )
} }
...@@ -5,9 +5,7 @@ const Index = () => ( ...@@ -5,9 +5,7 @@ const Index = () => (
<div> <div>
<Trans>Hello World.</Trans> <Trans>Hello World.</Trans>
<Link href="/two"> <Link href="/two">
<a> <Trans>Go to page 2</Trans>
<Trans>Go to page 2</Trans>
</a>
</Link> </Link>
<br /> <br />
</div> </div>
......
...@@ -5,9 +5,7 @@ const Two = () => ( ...@@ -5,9 +5,7 @@ const Two = () => (
<div> <div>
<Trans>Page two.</Trans>{' '} <Trans>Page two.</Trans>{' '}
<Link href="/"> <Link href="/">
<a> <Trans>Back home</Trans>
<Trans>Back home</Trans>
</a>
</Link> </Link>
<br /> <br />
</div> </div>
......
...@@ -37,13 +37,13 @@ export default function App({ Component, pageProps }: AppProps) { ...@@ -37,13 +37,13 @@ export default function App({ Component, pageProps }: AppProps) {
margin: 0 10px 0 0; margin: 0 10px 0 0;
} }
`}</style> `}</style>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
<Link href="/about"> <Link href="/about" legacyBehavior>
<a>About</a> <a>About</a>
</Link> </Link>
<Link href="/forever"> <Link href="/forever" legacyBehavior>
<a>Forever</a> <a>Forever</a>
</Link> </Link>
<a href="/non-existing">Non Existing Page</a> <a href="/non-existing">Non Existing Page</a>
......
...@@ -9,14 +9,14 @@ const Header = () => { ...@@ -9,14 +9,14 @@ const Header = () => {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
</li> </li>
{user ? ( {user ? (
<> <>
<li> <li>
<Link href="/profile"> <Link href="/profile" legacyBehavior>
<a>Profile</a> <a>Profile</a>
</Link> </Link>
</li> </li>
...@@ -26,7 +26,7 @@ const Header = () => { ...@@ -26,7 +26,7 @@ const Header = () => {
</> </>
) : ( ) : (
<li> <li>
<Link href="/login"> <Link href="/login" legacyBehavior>
<a>Login</a> <a>Login</a>
</Link> </Link>
</li> </li>
......
...@@ -3,7 +3,7 @@ import Link from 'next/link' ...@@ -3,7 +3,7 @@ import Link from 'next/link'
export default function CustomLink({ as, href, ...otherProps }) { export default function CustomLink({ as, href, ...otherProps }) {
return ( return (
<> <>
<Link as={as} href={href}> <Link as={as} href={href} legacyBehavior>
<a {...otherProps} /> <a {...otherProps} />
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -20,7 +20,7 @@ export default function Index({ posts }) { ...@@ -20,7 +20,7 @@ export default function Index({ posts }) {
as={`/posts/${post.filePath.replace(/\.mdx?$/, '')}`} as={`/posts/${post.filePath.replace(/\.mdx?$/, '')}`}
href={`/posts/[slug]`} href={`/posts/[slug]`}
> >
<a>{post.data.title}</a> {post.data.title}
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -28,7 +28,7 @@ export default function PostPage({ source, frontMatter }) { ...@@ -28,7 +28,7 @@ export default function PostPage({ source, frontMatter }) {
<Layout> <Layout>
<header> <header>
<nav> <nav>
<Link href="/"> <Link href="/" legacyBehavior>
<a>👈 Go back home</a> <a>👈 Go back home</a>
</Link> </Link>
</nav> </nav>
......
...@@ -25,9 +25,7 @@ const SampleComponent: React.FC<IOwnProps> = observer((props) => { ...@@ -25,9 +25,7 @@ const SampleComponent: React.FC<IOwnProps> = observer((props) => {
<h1>{props.title}</h1> <h1>{props.title}</h1>
<Clock lastUpdate={lastUpdate} light={light} /> <Clock lastUpdate={lastUpdate} light={light} />
<nav> <nav>
<Link href={props.linkTo}> <Link href={props.linkTo}>Navigate</Link>
<a>Navigate</a>
</Link>
</nav> </nav>
</div> </div>
) )
......
...@@ -23,9 +23,7 @@ const Page = observer(function Page(props) { ...@@ -23,9 +23,7 @@ const Page = observer(function Page(props) {
<h1>{props.title}</h1> <h1>{props.title}</h1>
<Clock /> <Clock />
<nav> <nav>
<Link href={props.linkTo}> <Link href={props.linkTo}>Navigate</Link>
<a>Navigate</a>
</Link>
</nav> </nav>
</div> </div>
) )
......
...@@ -49,7 +49,7 @@ const PetPage = ({ pet }) => { ...@@ -49,7 +49,7 @@ const PetPage = ({ pet }) => {
</div> </div>
<div className="btn-container"> <div className="btn-container">
<Link href="/[id]/edit" as={`/${pet._id}/edit`}> <Link href="/[id]/edit" as={`/${pet._id}/edit`} legacyBehavior>
<button className="btn edit">Edit</button> <button className="btn edit">Edit</button>
</Link> </Link>
<button className="btn delete" onClick={handleDelete}> <button className="btn delete" onClick={handleDelete}>
......
...@@ -12,12 +12,8 @@ function MyApp({ Component, pageProps }) { ...@@ -12,12 +12,8 @@ function MyApp({ Component, pageProps }) {
<div className="top-bar"> <div className="top-bar">
<div className="nav"> <div className="nav">
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a> <Link href="/new">Add Pet</Link>
</Link>
<Link href="/new">
<a>Add Pet</a>
</Link>
</div> </div>
<img <img
......
...@@ -33,10 +33,10 @@ const Index = ({ pets }) => ( ...@@ -33,10 +33,10 @@ const Index = ({ pets }) => (
</div> </div>
<div className="btn-container"> <div className="btn-container">
<Link href="/[id]/edit" as={`/${pet._id}/edit`}> <Link href="/[id]/edit" as={`/${pet._id}/edit`} legacyBehavior>
<button className="btn edit">Edit</button> <button className="btn edit">Edit</button>
</Link> </Link>
<Link href="/[id]" as={`/${pet._id}`}> <Link href="/[id]" as={`/${pet._id}`} legacyBehavior>
<button className="btn view">View</button> <button className="btn view">View</button>
</Link> </Link>
</div> </div>
......
...@@ -48,11 +48,7 @@ export default function Asset() { ...@@ -48,11 +48,7 @@ export default function Asset() {
<> <>
<ErrorMessage message={errorMessage} /> <ErrorMessage message={errorMessage} />
<p> <p>
Go{' '} Go <Link href="/">back home</Link> to upload another video.
<Link href="/">
<a>back home</a>
</Link>{' '}
to upload another video.
</p> </p>
</> </>
) : ( ) : (
......
...@@ -53,7 +53,7 @@ export default function Playback({ playbackId, poster }) { ...@@ -53,7 +53,7 @@ export default function Playback({ playbackId, poster }) {
<MuxPlayer style={{ width: '100%' }} playbackId={playbackId} /> <MuxPlayer style={{ width: '100%' }} playbackId={playbackId} />
<p> <p>
Go{' '} Go{' '}
<Link href="/"> <Link href="/" legacyBehavior>
<a>back home</a> <a>back home</a>
</Link>{' '} </Link>{' '}
to upload another video. to upload another video.
......
...@@ -41,6 +41,7 @@ export default function Actor() { ...@@ -41,6 +41,7 @@ export default function Actor() {
as={{ as={{
pathname: `/movie/${encodeURIComponent(movie)}`, pathname: `/movie/${encodeURIComponent(movie)}`,
}} }}
legacyBehavior
> >
<a>{movie}</a> <a>{movie}</a>
</Link> </Link>
...@@ -50,7 +51,7 @@ export default function Actor() { ...@@ -50,7 +51,7 @@ export default function Actor() {
</div> </div>
<div className="back"> <div className="back">
<Link href="/"> <Link href="/" legacyBehavior>
<a>🔙 Go Back</a> <a>🔙 Go Back</a>
</Link> </Link>
</div> </div>
......
...@@ -42,7 +42,10 @@ export default function Home() { ...@@ -42,7 +42,10 @@ export default function Home() {
<tr className="movie" key={movie.title}> <tr className="movie" key={movie.title}>
<th>{index + 1}</th> <th>{index + 1}</th>
<td> <td>
<Link href={`/movie/${encodeURIComponent(movie.title)}`}> <Link
href={`/movie/${encodeURIComponent(movie.title)}`}
legacyBehavior
>
<a className="link">{movie.title}</a> <a className="link">{movie.title}</a>
</Link> </Link>
</td> </td>
...@@ -59,7 +62,10 @@ export default function Home() { ...@@ -59,7 +62,10 @@ export default function Home() {
<ul> <ul>
{movie.actors.map((actor) => ( {movie.actors.map((actor) => (
<li key={actor}> <li key={actor}>
<Link href={`/actor/${encodeURIComponent(actor)}`}> <Link
href={`/actor/${encodeURIComponent(actor)}`}
legacyBehavior
>
<a className="link">{actor}</a> <a className="link">{actor}</a>
</Link> </Link>
</li> </li>
......
...@@ -40,7 +40,11 @@ export default function Movie() { ...@@ -40,7 +40,11 @@ export default function Movie() {
<h2>Actors</h2> <h2>Actors</h2>
{data.movie.actors.map((actor) => ( {data.movie.actors.map((actor) => (
<div key={actor}> <div key={actor}>
<Link key={actor} href={`/actor/${encodeURIComponent(actor)}`}> <Link
key={actor}
href={`/actor/${encodeURIComponent(actor)}`}
legacyBehavior
>
<a className="link">{actor}</a> <a className="link">{actor}</a>
</Link> </Link>
</div> </div>
...@@ -55,7 +59,7 @@ export default function Movie() { ...@@ -55,7 +59,7 @@ export default function Movie() {
</div> </div>
<div className="back"> <div className="back">
<Link href="/"> <Link href="/" legacyBehavior>
<a>🔙 Go Back</a> <a>🔙 Go Back</a>
</Link> </Link>
</div> </div>
......
...@@ -3,13 +3,13 @@ import Link from 'next/link' ...@@ -3,13 +3,13 @@ import Link from 'next/link'
const Layout = ({ children }) => ( const Layout = ({ children }) => (
<> <>
<nav> <nav>
<Link href="/"> <Link href="/" legacyBehavior>
<a>home</a> <a>home</a>
</Link> </Link>
<Link href="/blog"> <Link href="/blog" legacyBehavior>
<a>blog</a> <a>blog</a>
</Link> </Link>
<Link href="/about"> <Link href="/about" legacyBehavior>
<a>about</a> <a>about</a>
</Link> </Link>
</nav> </nav>
......
...@@ -20,7 +20,11 @@ const Blog = ({ postsList }) => ( ...@@ -20,7 +20,11 @@ const Blog = ({ postsList }) => (
<Layout> <Layout>
{postsList.map((post) => ( {postsList.map((post) => (
<div key={post.slug} className="post"> <div key={post.slug} className="post">
<Link href="/blog/post/[slug]" as={`/blog/post/${post.slug}`}> <Link
href="/blog/post/[slug]"
as={`/blog/post/${post.slug}`}
legacyBehavior
>
<a> <a>
<img src={post.attributes.thumbnail} /> <img src={post.attributes.thumbnail} />
<h2>{post.attributes.title}</h2> <h2>{post.attributes.title}</h2>
......
...@@ -25,8 +25,8 @@ const About = (props) => { ...@@ -25,8 +25,8 @@ const About = (props) => {
Notice how a loading spinner showed up while my content was "loading"? Notice how a loading spinner showed up while my content was "loading"?
Pretty neat, huh? Pretty neat, huh?
</p> </p>
<Link href="/"> <Link href="/" className="btn btn-light">
<a className="btn btn-light">Go back home</a> Go back home
</Link> </Link>
</div> </div>
) )
......
...@@ -3,8 +3,8 @@ import Link from 'next/link' ...@@ -3,8 +3,8 @@ import Link from 'next/link'
const Index = () => ( const Index = () => (
<div className="container bg-primary page"> <div className="container bg-primary page">
<h1>Hello, world!</h1> <h1>Hello, world!</h1>
<Link href="/about"> <Link href="/about" className="btn btn-light">
<a className="btn btn-light">About us</a> About us
</Link> </Link>
</div> </div>
) )
......
...@@ -33,11 +33,8 @@ export default function Home() { ...@@ -33,11 +33,8 @@ export default function Home() {
<h1>SEO Added to Page</h1> <h1>SEO Added to Page</h1>
<p>Take a look at the head to see what has been added.</p> <p>Take a look at the head to see what has been added.</p>
<p> <p>
Or checkout how{' '} Or checkout how <Link href="/jsonld">JSON-LD</Link> (Structured Data) is
<Link href="/jsonld"> added
<a>JSON-LD</a>
</Link>{' '}
(Structured Data) is added
</p> </p>
</div> </div>
) )
......
...@@ -6,27 +6,27 @@ const IndexPage = () => ( ...@@ -6,27 +6,27 @@ const IndexPage = () => (
<ol> <ol>
<li> <li>
<Link href="/[dynamic]" as="/page-1"> <Link href="/[dynamic]" as="/page-1">
<a>Link to dynamic page 1</a> Link to dynamic page 1
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/[dynamic]" as="/page-2"> <Link href="/[dynamic]" as="/page-2">
<a>Link to dynamic page 2</a> Link to dynamic page 2
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/[dynamic]" as="/page-3"> <Link href="/[dynamic]" as="/page-3">
<a>Link to dynamic page 3</a> Link to dynamic page 3
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/[dynamic]" as="/page-4"> <Link href="/[dynamic]" as="/page-4">
<a>Link to dynamic page 4</a> Link to dynamic page 4
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/[dynamic]" as="/page-5"> <Link href="/[dynamic]" as="/page-5">
<a>Link to dynamic page 5</a> Link to dynamic page 5
</Link> </Link>
</li> </li>
</ol> </ol>
......
...@@ -24,7 +24,7 @@ export default function Home() { ...@@ -24,7 +24,7 @@ export default function Home() {
</p> </p>
<div className="grid"> <div className="grid">
<Link href="/" locale="en"> <Link href="/" locale="en" legacyBehavior>
<div className="card"> <div className="card">
<h3>{t('home:english')}</h3> <h3>{t('home:english')}</h3>
<p> <p>
...@@ -33,7 +33,7 @@ export default function Home() { ...@@ -33,7 +33,7 @@ export default function Home() {
</div> </div>
</Link> </Link>
<Link href="/" locale="ca"> <Link href="/" locale="ca" legacyBehavior>
<div className="card"> <div className="card">
<h3>{t('home:catalan')}</h3> <h3>{t('home:catalan')}</h3>
<p> <p>
...@@ -42,7 +42,7 @@ export default function Home() { ...@@ -42,7 +42,7 @@ export default function Home() {
</div> </div>
</Link> </Link>
<Link href="/" locale="ar"> <Link href="/" locale="ar" legacyBehavior>
<div className="card"> <div className="card">
<h3>{t('home:arabic')}</h3> <h3>{t('home:arabic')}</h3>
<p> <p>
...@@ -51,7 +51,7 @@ export default function Home() { ...@@ -51,7 +51,7 @@ export default function Home() {
</div> </div>
</Link> </Link>
<Link href="/" locale="he"> <Link href="/" locale="he" legacyBehavior>
<div className="card"> <div className="card">
<h3>{t('home:hebrew')}</h3> <h3>{t('home:hebrew')}</h3>
<p> <p>
......
...@@ -8,12 +8,8 @@ function Header() { ...@@ -8,12 +8,8 @@ function Header() {
return ( return (
<div> <div>
<h1>{state.page}</h1> <h1>{state.page}</h1>
<Link href="/"> <Link href="/">Home page</Link>
<a>Home page</a> <Link href="/about">About Page</Link>
</Link>
<Link href="/about">
<a>About Page</a>
</Link>
</div> </div>
) )
} }
......
...@@ -14,12 +14,16 @@ export default function Navbar() { ...@@ -14,12 +14,16 @@ export default function Navbar() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/">Home</Link> <Link href="/" legacyBehavior>
Home
</Link>
</li> </li>
{user ? ( {user ? (
<> <>
<li> <li>
<Link href="/profile">Profile</Link> <Link href="/profile" legacyBehavior>
Profile
</Link>
</li> </li>
<li> <li>
<a role="button" onClick={handleLogout}> <a role="button" onClick={handleLogout}>
...@@ -30,10 +34,14 @@ export default function Navbar() { ...@@ -30,10 +34,14 @@ export default function Navbar() {
) : ( ) : (
<> <>
<li> <li>
<Link href="/signup">Sign up</Link> <Link href="/signup" legacyBehavior>
Sign up
</Link>
</li> </li>
<li> <li>
<Link href="/login">Login</Link> <Link href="/login" legacyBehavior>
Login
</Link>
</li> </li>
</> </>
)} )}
......
...@@ -20,14 +20,14 @@ const Form = ({ isLogin, errorMessage, onSubmit }) => ( ...@@ -20,14 +20,14 @@ const Form = ({ isLogin, errorMessage, onSubmit }) => (
<div className="submit"> <div className="submit">
{isLogin ? ( {isLogin ? (
<> <>
<Link href="/signup"> <Link href="/signup" legacyBehavior>
<a>I don't have an account</a> <a>I don't have an account</a>
</Link> </Link>
<button type="submit">Login</button> <button type="submit">Login</button>
</> </>
) : ( ) : (
<> <>
<Link href="/login"> <Link href="/login" legacyBehavior>
<a>I already have an account</a> <a>I already have an account</a>
</Link> </Link>
<button type="submit">Signup</button> <button type="submit">Signup</button>
......
...@@ -9,14 +9,14 @@ const Header = () => { ...@@ -9,14 +9,14 @@ const Header = () => {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link> </Link>
</li> </li>
{user ? ( {user ? (
<> <>
<li> <li>
<Link href="/profile"> <Link href="/profile" legacyBehavior>
<a>Profile</a> <a>Profile</a>
</Link> </Link>
</li> </li>
...@@ -26,7 +26,7 @@ const Header = () => { ...@@ -26,7 +26,7 @@ const Header = () => {
</> </>
) : ( ) : (
<li> <li>
<Link href="/login"> <Link href="/login" legacyBehavior>
<a>Login</a> <a>Login</a>
</Link> </Link>
</li> </li>
......
...@@ -6,19 +6,13 @@ export default function Header() { ...@@ -6,19 +6,13 @@ export default function Header() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/contact"> <Link href="/contact">Contact</Link>
<a>Contact</a>
</Link>
</li> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -7,9 +7,7 @@ export default function About() { ...@@ -7,9 +7,7 @@ export default function About() {
<main className={styles.main}> <main className={styles.main}>
<h1>About Page</h1> <h1>About Page</h1>
<p className={styles.description}> <p className={styles.description}>
<Link href="/"> <Link href="/">&larr; Go Back</Link>
<a>&larr; Go Back</a>
</Link>
</p> </p>
</main> </main>
</div> </div>
......
...@@ -23,11 +23,9 @@ export default function Home() { ...@@ -23,11 +23,9 @@ export default function Home() {
</p> </p>
<div className={styles.grid}> <div className={styles.grid}>
<Link href="/about"> <Link href="/about" className={styles.card}>
<a className={styles.card}> <h2>About Page &rarr;</h2>
<h2>About Page &rarr;</h2> <p>Playwright will test if this link is working.</p>
<p>Playwright will test if this link is working.</p>
</a>
</Link> </Link>
<a href="https://nextjs.org/docs" className={styles.card}> <a href="https://nextjs.org/docs" className={styles.card}>
......
...@@ -10,15 +10,15 @@ export default function Nav() { ...@@ -10,15 +10,15 @@ export default function Nav() {
Automatically prefetch pages in the background as soon the Link appears Automatically prefetch pages in the background as soon the Link appears
in the view: in the view:
</p> </p>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Home</a> <a>Home</a>
</Link>{' '} </Link>{' '}
<Link href="/features"> <Link href="/features" legacyBehavior>
<a>Features</a> <a>Features</a>
</Link> </Link>
<h2>Imperative</h2> <h2>Imperative</h2>
<p>Prefetch on onMouseEnter or on other events:</p> <p>Prefetch on onMouseEnter or on other events:</p>
<Link prefetch={false} href="/about"> <Link prefetch={false} href="/about" legacyBehavior>
<a <a
onMouseEnter={() => { onMouseEnter={() => {
router.prefetch('/about') router.prefetch('/about')
...@@ -30,7 +30,7 @@ export default function Nav() { ...@@ -30,7 +30,7 @@ export default function Nav() {
</Link> </Link>
<h2>Disable</h2> <h2>Disable</h2>
<p>Disable prefetching</p> <p>Disable prefetching</p>
<Link prefetch={false} href="/contact"> <Link prefetch={false} href="/contact" legacyBehavior>
<a>Contact</a> <a>Contact</a>
</Link> </Link>
<style jsx>{` <style jsx>{`
......
...@@ -20,13 +20,13 @@ const Layout = ({ children }) => { ...@@ -20,13 +20,13 @@ const Layout = ({ children }) => {
</Navbar.Brand> </Navbar.Brand>
<Navbar.Menu> <Navbar.Menu>
<Navbar.Segment align="start"> <Navbar.Segment align="start">
<Link href="/"> <Link href="/" legacyBehavior>
<Navbar.Item>Home</Navbar.Item> <Navbar.Item>Home</Navbar.Item>
</Link> </Link>
<Link href="/about"> <Link href="/about" legacyBehavior>
<Navbar.Item>About</Navbar.Item> <Navbar.Item>About</Navbar.Item>
</Link> </Link>
<Link href="/contact"> <Link href="/contact" legacyBehavior>
<Navbar.Item>Contact</Navbar.Item> <Navbar.Item>Contact</Navbar.Item>
</Link> </Link>
</Navbar.Segment> </Navbar.Segment>
......
...@@ -9,10 +9,8 @@ const Home = () => ( ...@@ -9,10 +9,8 @@ const Home = () => (
<Card.Content> <Card.Content>
<Content> <Content>
<Link href="https://github.com/vercel/next.js#getting-started"> <Link href="https://github.com/vercel/next.js#getting-started">
<a> <Title as="h3">Getting Started &rarr;</Title>
<Title as="h3">Getting Started &rarr;</Title> <p>Learn more about Next on Github and in their examples</p>
<p>Learn more about Next on Github and in their examples</p>
</a>
</Link> </Link>
</Content> </Content>
</Card.Content> </Card.Content>
...@@ -21,13 +19,11 @@ const Home = () => ( ...@@ -21,13 +19,11 @@ const Home = () => (
<Card.Content> <Card.Content>
<Content> <Content>
<Link href="https://github.com/vercel/next.js/tree/canary/examples"> <Link href="https://github.com/vercel/next.js/tree/canary/examples">
<a> <Title as="h3">Examples &rarr;</Title>
<Title as="h3">Examples &rarr;</Title> <p>
<p> Find other example boilerplates on the{' '}
Find other example boilerplates on the{' '} <code>create-next-app</code> site
<code>create-next-app</code> site </p>
</p>
</a>
</Link> </Link>
</Content> </Content>
</Card.Content> </Card.Content>
...@@ -36,10 +32,8 @@ const Home = () => ( ...@@ -36,10 +32,8 @@ const Home = () => (
<Card.Content> <Card.Content>
<Content> <Content>
<Link href="https://github.com/vercel/next.js/tree/canary/packages/create-next-app"> <Link href="https://github.com/vercel/next.js/tree/canary/packages/create-next-app">
<a> <Title as="h3">Create Next App &rarr;</Title>
<Title as="h3">Create Next App &rarr;</Title> <p>Was this tool helpful? Let us know how we can improve it</p>
<p>Was this tool helpful? Let us know how we can improve it</p>
</a>
</Link> </Link>
</Content> </Content>
</Card.Content> </Card.Content>
......
...@@ -16,7 +16,7 @@ export default function Home() { ...@@ -16,7 +16,7 @@ export default function Home() {
<code>react-foundation</code>. <code>react-foundation</code>.
</p> </p>
<Link href="https://nextjs.org" passHref={true}> <Link href="https://nextjs.org" passHref={true}>
<a>view repository</a> view repository
</Link> </Link>
</Callout> </Callout>
</div> </div>
......
...@@ -3,10 +3,7 @@ import Link from 'next/link' ...@@ -3,10 +3,7 @@ import Link from 'next/link'
export default function Home() { export default function Home() {
return ( return (
<div> <div>
Hello World.{' '} Hello World. <Link href="/about">About</Link>
<Link href="/about">
<a>About</a>
</Link>
</div> </div>
) )
} }
...@@ -9,22 +9,18 @@ export default function Nav() { ...@@ -9,22 +9,18 @@ export default function Nav() {
<nav className={styles.nav}> <nav className={styles.nav}>
<li className={styles.li}> <li className={styles.li}>
<Link href="/" passHref> <Link href="/" passHref>
<a> <FormattedMessage
<FormattedMessage defaultMessage="Home"
defaultMessage="Home" description="Nav: Index name"
description="Nav: Index name" />
/>
</a>
</Link> </Link>
</li> </li>
<li className={styles.li}> <li className={styles.li}>
<Link href="/about" passHref> <Link href="/about" passHref>
<a> <FormattedMessage
<FormattedMessage defaultMessage="About"
defaultMessage="About" description="Nav: About item"
description="Nav: About item" />
/>
</a>
</Link> </Link>
</li> </li>
...@@ -37,12 +33,9 @@ export default function Nav() { ...@@ -37,12 +33,9 @@ export default function Nav() {
locale={availableLocale} locale={availableLocale}
passHref passHref
prefetch={false} prefetch={false}
className={availableLocale === locale ? styles.active : undefined}
> >
<a {availableLocale}
className={availableLocale === locale ? styles.active : undefined}
>
{availableLocale}
</a>
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -30,8 +30,9 @@ export default function LinkUnstyled({ ...@@ -30,8 +30,9 @@ export default function LinkUnstyled({
replace={replace} replace={replace}
href={href} href={href}
as={as} as={as}
{...props}
> >
<a {...props}>{children}</a> {children}
</Link> </Link>
) )
} }
...@@ -26,8 +26,9 @@ export default function LinkUnstyled({ ...@@ -26,8 +26,9 @@ export default function LinkUnstyled({
replace={replace} replace={replace}
href={href} href={href}
as={as} as={as}
{...props}
> >
<a {...props}>{children}</a> {children}
</Link> </Link>
) )
} }
...@@ -20,9 +20,7 @@ const Counter = () => { ...@@ -20,9 +20,7 @@ const Counter = () => {
<UserInfo /> <UserInfo />
<br /> <br />
<nav> <nav>
<Link href="/other"> <Link href="/other">Navigate to "/other"</Link>
<a>Navigate to "/other"</a>
</Link>
</nav> </nav>
</div> </div>
) )
......
...@@ -3,9 +3,7 @@ import Link from 'next/link' ...@@ -3,9 +3,7 @@ import Link from 'next/link'
const OtherPage = () => ( const OtherPage = () => (
<div> <div>
<h1>Other Page</h1> <h1>Other Page</h1>
<Link href="/"> <Link href="/">Get back to "/"</Link>
<a>Get back to "/"</a>
</Link>
</div> </div>
) )
......
...@@ -15,9 +15,7 @@ function Page({ linkTo, NavigateTo, title }) { ...@@ -15,9 +15,7 @@ function Page({ linkTo, NavigateTo, title }) {
<Clock lastUpdate={lastUpdate} light={light} /> <Clock lastUpdate={lastUpdate} light={light} />
<Counter /> <Counter />
<nav> <nav>
<Link href={linkTo}> <Link href={linkTo}>Navigate:{NavigateTo}</Link>
<a>Navigate: {NavigateTo}</a>
</Link>
</nav> </nav>
{placeholderData && ( {placeholderData && (
<pre> <pre>
......
...@@ -13,9 +13,7 @@ const Index = () => { ...@@ -13,9 +13,7 @@ const Index = () => {
return ( return (
<> <>
<Examples /> <Examples />
<Link href="/show-redux-state"> <Link href="/show-redux-state">Click to see current Redux State</Link>
<a>Click to see current Redux State</a>
</Link>
</> </>
) )
} }
......
...@@ -17,9 +17,7 @@ const ShowReduxState = () => { ...@@ -17,9 +17,7 @@ const ShowReduxState = () => {
<pre style={codeStyle}> <pre style={codeStyle}>
<code>{JSON.stringify(state, null, 4)}</code> <code>{JSON.stringify(state, null, 4)}</code>
</pre> </pre>
<Link href="/"> <Link href="/">Go Back Home</Link>
<a>Go Back Home</a>
</Link>
</> </>
) )
} }
......
...@@ -9,9 +9,7 @@ const Page = ({ title, linkTo, tick }) => ( ...@@ -9,9 +9,7 @@ const Page = ({ title, linkTo, tick }) => (
<Clock lastUpdate={tick.lastUpdate} light={tick.light} /> <Clock lastUpdate={tick.lastUpdate} light={tick.light} />
<AddCount /> <AddCount />
<nav> <nav>
<Link href={linkTo}> <Link href={linkTo}>Navigate</Link>
<a>Navigate</a>
</Link>
</nav> </nav>
</div> </div>
) )
......
...@@ -3,9 +3,7 @@ import Link from 'next/link' ...@@ -3,9 +3,7 @@ import Link from 'next/link'
export default function About() { export default function About() {
return ( return (
<div> <div>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
<p>This is the about page</p> <p>This is the about page</p>
</div> </div>
) )
......
...@@ -6,9 +6,7 @@ import indexPageQuery from '../queries/indexPage' ...@@ -6,9 +6,7 @@ import indexPageQuery from '../queries/indexPage'
const Index = ({ viewer }) => ( const Index = ({ viewer }) => (
<div> <div>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
<BlogPosts viewer={viewer} /> <BlogPosts viewer={viewer} />
</div> </div>
) )
......
...@@ -9,8 +9,13 @@ export default function PostCardGrid() { ...@@ -9,8 +9,13 @@ export default function PostCardGrid() {
<h2>With QueryString Routing, and a reload won't use the modal</h2> <h2>With QueryString Routing, and a reload won't use the modal</h2>
<div className={styles.postCardGrid}> <div className={styles.postCardGrid}>
{data.map((id, index) => ( {data.map((id, index) => (
<Link key={index} href={`/?postId=${id}`} as={`/post/${id}`}> <Link
<a className={styles.postCard}>{id}</a> key={index}
href={`/?postId=${id}`}
as={`/post/${id}`}
className={styles.postCard}
>
{id}
</Link> </Link>
))} ))}
</div> </div>
...@@ -18,8 +23,13 @@ export default function PostCardGrid() { ...@@ -18,8 +23,13 @@ export default function PostCardGrid() {
<h2>With Dynamic Routing, and reloads will keep the modal</h2> <h2>With Dynamic Routing, and reloads will keep the modal</h2>
<div className={styles.postCardGrid}> <div className={styles.postCardGrid}>
{data.map((id, index) => ( {data.map((id, index) => (
<Link key={index} href="/article/[articleId]" as={`/article/${id}`}> <Link
<a className={styles.postCard}>{id}</a> key={index}
href="/article/[articleId]"
as={`/article/${id}`}
className={styles.postCard}
>
{id}
</Link> </Link>
))} ))}
</div> </div>
......
...@@ -7,19 +7,13 @@ export default function Header() { ...@@ -7,19 +7,13 @@ export default function Header() {
<nav> <nav>
<ul> <ul>
<li> <li>
<Link href="/"> <Link href="/">Home</Link>
<a>Home</a>
</Link>
</li> </li>
<li> <li>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</li> </li>
<li> <li>
<Link href="/contact"> <Link href="/contact">Contact</Link>
<a>Contact</a>
</Link>
</li> </li>
</ul> </ul>
</nav> </nav>
......
...@@ -82,10 +82,7 @@ const Index = () => ( ...@@ -82,10 +82,7 @@ const Index = () => (
<a href="/ssr/test1" target="_blank"> <a href="/ssr/test1" target="_blank">
Open in a new tab Open in a new tab
</a>{' '} </a>{' '}
or{' '} or <Link href="/ssr/test1">Perform client side navigation</Link>
<Link href="/ssr/test1">
<a>Perform client side navigation</a>
</Link>
</li> </li>
<li> <li>
getServerSideProps returns a Promise that rejects. This should cause getServerSideProps returns a Promise that rejects. This should cause
...@@ -117,10 +114,7 @@ const Index = () => ( ...@@ -117,10 +114,7 @@ const Index = () => (
<li> <li>
There is a top-of-module Promise that rejects, but its result is not There is a top-of-module Promise that rejects, but its result is not
awaited. Sentry should record Error('Client Test 1').{' '} awaited. Sentry should record Error('Client Test 1').{' '}
<Link href="/client/test1"> <Link href="/client/test1">Perform client side navigation</Link> or{' '}
<a>Perform client side navigation</a>
</Link>{' '}
or{' '}
<a href="/client/test1" target="_blank"> <a href="/client/test1" target="_blank">
Open in a new tab Open in a new tab
</a> </a>
...@@ -128,10 +122,7 @@ const Index = () => ( ...@@ -128,10 +122,7 @@ const Index = () => (
<li> <li>
There is a top-of-module exception. _error.js should render and record There is a top-of-module exception. _error.js should render and record
ReferenceError('process is not defined') in Sentry.{' '} ReferenceError('process is not defined') in Sentry.{' '}
<Link href="/client/test2"> <Link href="/client/test2">Perform client side navigation</Link> or{' '}
<a>Perform client side navigation</a>
</Link>{' '}
or{' '}
<a href="/client/test2" target="_blank"> <a href="/client/test2" target="_blank">
Open in a new tab Open in a new tab
</a> </a>
...@@ -141,10 +132,7 @@ const Index = () => ( ...@@ -141,10 +132,7 @@ const Index = () => (
Next.js's React Error Boundary. In this case, when the component Next.js's React Error Boundary. In this case, when the component
mounts. This should cause _error.js to render and record Error('Client mounts. This should cause _error.js to render and record Error('Client
Test 3') in Sentry.{' '} Test 3') in Sentry.{' '}
<Link href="/client/test3"> <Link href="/client/test3">Perform client side navigation</Link> or{' '}
<a>Perform client side navigation</a>
</Link>{' '}
or{' '}
<a href="/client/test3" target="_blank"> <a href="/client/test3" target="_blank">
Open in a new tab Open in a new tab
</a> </a>
...@@ -153,10 +141,7 @@ const Index = () => ( ...@@ -153,10 +141,7 @@ const Index = () => (
There is an unhandled Promise rejection during React lifecycle. In There is an unhandled Promise rejection during React lifecycle. In
this case, when the component mounts. Sentry should record this case, when the component mounts. Sentry should record
Error('Client Test 4').{' '} Error('Client Test 4').{' '}
<Link href="/client/test4"> <Link href="/client/test4">Perform client side navigation</Link> or{' '}
<a>Perform client side navigation</a>
</Link>{' '}
or{' '}
<a href="/client/test4" target="_blank"> <a href="/client/test4" target="_blank">
Open in a new tab Open in a new tab
</a> </a>
...@@ -165,10 +150,7 @@ const Index = () => ( ...@@ -165,10 +150,7 @@ const Index = () => (
An Error is thrown from an event handler. Sentry should record An Error is thrown from an event handler. Sentry should record
Error('Client Test 5'). (This page also demonstrates how to manually Error('Client Test 5'). (This page also demonstrates how to manually
instrument your code for performance monitoring.){' '} instrument your code for performance monitoring.){' '}
<Link href="/client/test5"> <Link href="/client/test5">Perform client side navigation</Link> or{' '}
<a>Perform client side navigation</a>
</Link>{' '}
or{' '}
<a href="/client/test5" target="_blank"> <a href="/client/test5" target="_blank">
Open in a new tab Open in a new tab
</a> </a>
......
...@@ -10,30 +10,28 @@ export default function ProductCard({ product }) { ...@@ -10,30 +10,28 @@ export default function ProductCard({ product }) {
const [isLoading, setLoading] = useState(true) const [isLoading, setLoading] = useState(true)
return ( return (
<Link href={`/products/${product.id}`}> <Link href={`/products/${product.id}`} className="group">
<a className="group"> <div className="aspect-w-1 aspect-h-1 w-full overflow-hidden rounded-lg bg-gray-200 xl:aspect-w-7 xl:aspect-h-8">
<div className="aspect-w-1 aspect-h-1 w-full overflow-hidden rounded-lg bg-gray-200 xl:aspect-w-7 xl:aspect-h-8"> <Image
<Image alt=""
alt="" src={product.imageGroups[0].images[0].link}
src={product.imageGroups[0].images[0].link} fill
fill className={cn(
className={cn( 'object-cover duration-700 ease-in-out group-hover:opacity-75 ',
'object-cover duration-700 ease-in-out group-hover:opacity-75 ', isLoading
isLoading ? 'scale-110 blur-2xl grayscale'
? 'scale-110 blur-2xl grayscale' : 'scale-100 blur-0 grayscale-0'
: 'scale-100 blur-0 grayscale-0' )}
)} onLoadingComplete={() => setLoading(false)}
onLoadingComplete={() => setLoading(false)} />
/> </div>
</div> <div className="mt-4 flex items-center justify-between text-base font-medium text-gray-900">
<div className="mt-4 flex items-center justify-between text-base font-medium text-gray-900"> <h3>{product.name}</h3>
<h3>{product.name}</h3> <p>${product.price}</p>
<p>${product.price}</p> </div>
</div> <p className="mt-1 text-sm italic text-gray-500">
<p className="mt-1 text-sm italic text-gray-500"> {product.shortDescription}
{product.shortDescription} </p>
</p>
</a>
</Link> </Link>
) )
} }
...@@ -25,9 +25,7 @@ export default function Index({ initialPropsCounter }) { ...@@ -25,9 +25,7 @@ export default function Index({ initialPropsCounter }) {
return ( return (
<div> <div>
<h2>This is the Home Page</h2> <h2>This is the Home Page</h2>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
<button onClick={reload}>Reload</button> <button onClick={reload}>Reload</button>
<button onClick={incrementCounter}>Change State Counter</button> <button onClick={incrementCounter}>Change State Counter</button>
<p>"getServerSideProps" ran for "{initialPropsCounter}" times.</p> <p>"getServerSideProps" ran for "{initialPropsCounter}" times.</p>
......
...@@ -6,9 +6,7 @@ export default function Post({ title, body, id }: PostData) { ...@@ -6,9 +6,7 @@ export default function Post({ title, body, id }: PostData) {
<article> <article>
<h2>{title}</h2> <h2>{title}</h2>
<p>{body}</p> <p>{body}</p>
<Link href={`/post/${id}`}> <Link href={`/post/${id}`}>Read more...</Link>
<a>Read more...</a>
</Link>
</article> </article>
) )
} }
...@@ -47,9 +47,7 @@ const Post: NextPage<PostDataProps> = ({ postData }: PostDataProps) => { ...@@ -47,9 +47,7 @@ const Post: NextPage<PostDataProps> = ({ postData }: PostDataProps) => {
<p>{postData.body}</p> <p>{postData.body}</p>
<Link href="/"> <Link href="/">Go back to home</Link>
<a>Go back to home</a>
</Link>
</main> </main>
) )
} }
......
...@@ -32,17 +32,26 @@ export const Page: React.FC<PageProps> = ({ ...@@ -32,17 +32,26 @@ export const Page: React.FC<PageProps> = ({
<p>This example combines the following other examples:</p> <p>This example combines the following other examples:</p>
<ul> <ul>
<li> <li>
<Link href="https://github.com/vercel/next.js/tree/canary/examples/with-storybook"> <Link
href="https://github.com/vercel/next.js/tree/canary/examples/with-storybook"
legacyBehavior
>
<a>with-storybook</a> <a>with-storybook</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="https://github.com/next.js/tree/canary/examples/with-styled-jsx-scss"> <Link
href="https://github.com/next.js/tree/canary/examples/with-styled-jsx-scss"
legacyBehavior
>
<a>with-styled-jsx-scss</a> <a>with-styled-jsx-scss</a>
</Link> </Link>
</li> </li>
<li> <li>
<Link href="https://github.com/next.js/tree/canary/examples/with-styled-jsx-scss"> <Link
href="https://github.com/next.js/tree/canary/examples/with-styled-jsx-scss"
legacyBehavior
>
<a>with-typescript</a> <a>with-typescript</a>
</Link> </Link>
</li> </li>
...@@ -62,7 +71,10 @@ export const Page: React.FC<PageProps> = ({ ...@@ -62,7 +71,10 @@ export const Page: React.FC<PageProps> = ({
</p> </p>
<p> <p>
You might also want to check out the{' '} You might also want to check out the{' '}
<Link href="https://github.com/vercel/styled-jsx#styles-outside-of-components"> <Link
href="https://github.com/vercel/styled-jsx#styles-outside-of-components"
legacyBehavior
>
<a>Styled JSX documentation</a> <a>Styled JSX documentation</a>
</Link> </Link>
</p> </p>
......
...@@ -31,10 +31,8 @@ const Layout = ({ ...@@ -31,10 +31,8 @@ const Layout = ({
<div className="container"> <div className="container">
<header> <header>
<div className="header-content"> <div className="header-content">
<Link href="/"> <Link href="/" className="logo">
<a className="logo"> <img src="/logo.png" />
<img src="/logo.png" />
</a>
</Link> </Link>
<h1> <h1>
<span className="light">Stripe Sample</span> <span className="light">Stripe Sample</span>
......
...@@ -7,27 +7,30 @@ const IndexPage: NextPage = () => { ...@@ -7,27 +7,30 @@ const IndexPage: NextPage = () => {
<Layout title="Home | Next.js + TypeScript Example"> <Layout title="Home | Next.js + TypeScript Example">
<ul className="card-list"> <ul className="card-list">
<li> <li>
<Link href="/donate-with-checkout"> <Link
<a className="card checkout-style-background"> href="/donate-with-checkout"
<h2 className="bottom">Donate with Checkout</h2> className="card checkout-style-background"
<img src="/checkout-one-time-payments.svg" /> >
</a> <h2 className="bottom">Donate with Checkout</h2>
<img src="/checkout-one-time-payments.svg" />
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/donate-with-elements"> <Link
<a className="card elements-style-background"> href="/donate-with-elements"
<h2 className="bottom">Donate with Elements</h2> className="card elements-style-background"
<img src="/elements-card-payment.svg" /> >
</a> <h2 className="bottom">Donate with Elements</h2>
<img src="/elements-card-payment.svg" />
</Link> </Link>
</li> </li>
<li> <li>
<Link href="/use-shopping-cart"> <Link
<a className="card cart-style-background"> href="/use-shopping-cart"
<h2 className="bottom">Use Shopping Cart</h2> className="card cart-style-background"
<img src="/use-shopping-cart.png" /> >
</a> <h2 className="bottom">Use Shopping Cart</h2>
<img src="/use-shopping-cart.png" />
</Link> </Link>
</li> </li>
</ul> </ul>
......
...@@ -33,7 +33,7 @@ const StyledA = styled.a` ...@@ -33,7 +33,7 @@ const StyledA = styled.a`
` `
const StyledLink = ({ href, name }) => ( const StyledLink = ({ href, name }) => (
<Link href={href} passHref> <Link href={href} passHref legacyBehavior>
<StyledA>{name}</StyledA> <StyledA>{name}</StyledA>
</Link> </Link>
) )
......
...@@ -7,9 +7,7 @@ export default function About() { ...@@ -7,9 +7,7 @@ export default function About() {
<Main> <Main>
<Title>About Page</Title> <Title>About Page</Title>
<Description> <Description>
<Link href="/"> <Link href="/">&larr; Go Back</Link>
<a>&larr; Go Back</a>
</Link>
</Description> </Description>
</Main> </Main>
</Container> </Container>
......
...@@ -99,9 +99,7 @@ const Index = () => { ...@@ -99,9 +99,7 @@ const Index = () => {
)} )}
<Typography.Text> <Typography.Text>
<Link href="/profile"> <Link href="/profile">SSR example with getServerSideProps</Link>
<a>SSR example with getServerSideProps</a>
</Link>
</Typography.Text> </Typography.Text>
</> </>
)} )}
......
...@@ -18,9 +18,7 @@ export default function Profile({ user }) { ...@@ -18,9 +18,7 @@ export default function Profile({ user }) {
</Typography.Text> </Typography.Text>
<Typography.Text> <Typography.Text>
<Link href="/"> <Link href="/">Static example with useSWR</Link>
<a>Static example with useSWR</a>
</Link>
</Typography.Text> </Typography.Text>
</Space> </Space>
</Card> </Card>
......
...@@ -14,13 +14,7 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => ( ...@@ -14,13 +14,7 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</Head> </Head>
<header> <header>
<nav> <nav>
<Link href="/"> <Link href="/">Home</Link> | <Link href="/about">About</Link>{' '}
<a>Home</a>
</Link>{' '}
|{' '}
<Link href="/about">
<a>About</a>
</Link>{' '}
</nav> </nav>
</header> </header>
{children} {children}
......
...@@ -7,9 +7,7 @@ const AboutPage: NextPage = () => ( ...@@ -7,9 +7,7 @@ const AboutPage: NextPage = () => (
<h1>About</h1> <h1>About</h1>
<p>This is the about page</p> <p>This is the about page</p>
<p> <p>
<Link href="/"> <Link href="/">Go home</Link>
<a>Go home</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -23,9 +23,7 @@ const IndexPage = () => ( ...@@ -23,9 +23,7 @@ const IndexPage = () => (
</button> </button>
<p> <p>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -3,12 +3,7 @@ import Link from 'next/link' ...@@ -3,12 +3,7 @@ import Link from 'next/link'
const Nav = () => { const Nav = () => {
return ( return (
<nav> <nav>
<Link href="/"> <Link href="/">Experiments</Link> <Link href="/features">Features</Link>
<a>Experiments</a>
</Link>{' '}
<Link href="/features">
<a>Features</a>
</Link>
</nav> </nav>
) )
} }
......
...@@ -3,12 +3,8 @@ import Link from 'next/link' ...@@ -3,12 +3,8 @@ import Link from 'next/link'
export default function IndexPage() { export default function IndexPage() {
return ( return (
<div className="main"> <div className="main">
<Link href="/birds"> <Link href="/birds">Birds Example</Link>
<a>Birds Example</a> <Link href="/boxes">Boxes Example</Link>
</Link>
<Link href="/boxes">
<a>Boxes Example</a>
</Link>
</div> </div>
) )
} }
...@@ -36,6 +36,7 @@ export default function GlobalNav() { ...@@ -36,6 +36,7 @@ export default function GlobalNav() {
'block rounded-md px-3 py-2 text-sm font-medium hover:bg-zinc-800 hover:text-zinc-100', 'block rounded-md px-3 py-2 text-sm font-medium hover:bg-zinc-800 hover:text-zinc-100',
{ 'text-zinc-400': !isActive, 'text-white': isActive }, { 'text-zinc-400': !isActive, 'text-white': isActive },
)} )}
legacyBehavior
> >
{item.name} {item.name}
</Link> </Link>
......
...@@ -25,6 +25,7 @@ export default function Page() { ...@@ -25,6 +25,7 @@ export default function Page() {
href={`/${item.slug}`} href={`/${item.slug}`}
key={item.name} key={item.name}
className="block space-y-1.5 rounded-lg border border-white/10 px-4 py-3 hover:border-white/20" className="block space-y-1.5 rounded-lg border border-white/10 px-4 py-3 hover:border-white/20"
legacyBehavior
> >
<div>{item.name}</div> <div>{item.name}</div>
......
...@@ -9,7 +9,7 @@ export const SectionLink = ({ ...@@ -9,7 +9,7 @@ export const SectionLink = ({
href: string; href: string;
text: string; text: string;
}) => ( }) => (
<Link href={href} className="group block space-y-2"> <Link href={href} className="group block space-y-2" legacyBehavior>
<div className="-m-[5px] rounded-[20px] border border-zinc-900 p-1 transition group-hover:border-blue-600"> <div className="-m-[5px] rounded-[20px] border border-zinc-900 p-1 transition group-hover:border-blue-600">
{children} {children}
</div> </div>
......
...@@ -18,6 +18,7 @@ export const TabNavItem = ({ ...@@ -18,6 +18,7 @@ export const TabNavItem = ({
!isActive, !isActive,
'bg-vercel-blue text-white': isActive, 'bg-vercel-blue text-white': isActive,
})} })}
legacyBehavior
> >
{children} {children}
</Link> </Link>
......
...@@ -3,11 +3,7 @@ import Link from 'next/link' ...@@ -3,11 +3,7 @@ import Link from 'next/link'
export default function About() { export default function About() {
return ( return (
<div> <div>
Welcome to the about page. Go to the{' '} Welcome to the about page. Go to the <Link href="/">Home</Link> page.
<Link href="/">
<a>Home</a>
</Link>{' '}
page.
</div> </div>
) )
} }
...@@ -63,10 +63,7 @@ const Index = () => { ...@@ -63,10 +63,7 @@ const Index = () => {
return viewer ? ( return viewer ? (
<div> <div>
You're signed in as {viewer.name} and you're {viewer.status}. Go to the{' '} You're signed in as {viewer.name} and you're {viewer.status}. Go to the{' '}
<Link href="/about"> <Link href="/about">about</Link> page.
<a>about</a>
</Link>{' '}
page.
<div> <div>
<input <input
type="text" type="text"
......
...@@ -16,18 +16,9 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => ( ...@@ -16,18 +16,9 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</Head> </Head>
<header> <header>
<nav> <nav>
<Link href="/"> <Link href="/">Home</Link> | <Link href="/about">About</Link> |{' '}
<a>Home</a> <Link href="/users">Users List</Link> |{' '}
</Link>{' '} <a href="/api/users">Users API</a>
|{' '}
<Link href="/about">
<a>About</a>
</Link>{' '}
|{' '}
<Link href="/users">
<a>Users List</a>
</Link>{' '}
| <a href="/api/users">Users API</a>
</nav> </nav>
</header> </header>
{children} {children}
......
...@@ -9,9 +9,7 @@ type Props = { ...@@ -9,9 +9,7 @@ type Props = {
const ListItem = ({ data }: Props) => ( const ListItem = ({ data }: Props) => (
<Link href="/users/[id]" as={`/users/${data.id}`}> <Link href="/users/[id]" as={`/users/${data.id}`}>
<a> {data.id}:{data.name}
{data.id}: {data.name}
</a>
</Link> </Link>
) )
......
...@@ -6,9 +6,7 @@ const AboutPage = () => ( ...@@ -6,9 +6,7 @@ const AboutPage = () => (
<h1>About</h1> <h1>About</h1>
<p>This is the about page</p> <p>This is the about page</p>
<p> <p>
<Link href="/"> <Link href="/">Go home</Link>
<a>Go home</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -5,9 +5,7 @@ const IndexPage = () => ( ...@@ -5,9 +5,7 @@ const IndexPage = () => (
<Layout title="Home | Next.js + TypeScript Example"> <Layout title="Home | Next.js + TypeScript Example">
<h1>Hello Next.js 👋</h1> <h1>Hello Next.js 👋</h1>
<p> <p>
<Link href="/about"> <Link href="/about">About</Link>
<a>About</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -19,9 +19,7 @@ const WithStaticProps = ({ items }: Props) => ( ...@@ -19,9 +19,7 @@ const WithStaticProps = ({ items }: Props) => (
<p>You are currently on: /users</p> <p>You are currently on: /users</p>
<List items={items} /> <List items={items} />
<p> <p>
<Link href="/"> <Link href="/">Go home</Link>
<a>Go home</a>
</Link>
</p> </p>
</Layout> </Layout>
) )
......
...@@ -21,26 +21,24 @@ const Collections = ({ id_collection }: CollectionProps) => { ...@@ -21,26 +21,24 @@ const Collections = ({ id_collection }: CollectionProps) => {
<div className={styles.chips}> <div className={styles.chips}>
{data.map(({ id, title, slug }) => {data.map(({ id, title, slug }) =>
id_collection ? ( id_collection ? (
<Link href="/" key={`collection_${slug}`}> <Link href="/" key={`collection_${slug}`} className={styles.chip}>
<a className={styles.chip}> {title}
{title} <Link href="/" legacyBehavior>
<button
<Link href="/"> type="button"
<button className={styles.chip_remove}
type="button" aria-label="Return to home"
className={styles.chip_remove} ></button>
aria-label="Return to home" </Link>
></button>
</Link>
</a>
</Link> </Link>
) : ( ) : (
<Link <Link
href={{ pathname: '/collection/[slug]', query: { id: id } }} href={{ pathname: '/collection/[slug]', query: { id: id } }}
as={`/collection/${slug}?id=${id}`} as={`/collection/${slug}?id=${id}`}
key={`collection_${slug}`} key={`collection_${slug}`}
className={styles.chip}
> >
<a className={styles.chip}>{title}</a> {title}
</Link> </Link>
) )
)} )}
......
...@@ -12,20 +12,16 @@ const User = () => { ...@@ -12,20 +12,16 @@ const User = () => {
return ( return (
<header className={styles.header}> <header className={styles.header}>
<Link href="/"> <Link href="/">
<a> {data && (
{data && ( <img
<img src={data.profile_image.large}
src={data.profile_image.large} className={`${styles.headerImage} ${styles.borderCircle}`}
className={`${styles.headerImage} ${styles.borderCircle}`} alt={data.name}
alt={data.name} />
/> )}
)}
</a>
</Link> </Link>
<h2 className={styles.headingLg}> <h2 className={styles.headingLg}>
<Link href="/"> <Link href="/">{data ? data.name : ''}</Link>
<a>{data ? data.name : ''}</a>
</Link>
</h2> </h2>
{data ? <Social user={data} /> : ''} {data ? <Social user={data} /> : ''}
......
...@@ -9,9 +9,7 @@ export default function Index() { ...@@ -9,9 +9,7 @@ export default function Index() {
<CounterContainer.Provider> <CounterContainer.Provider>
<ClockContainer.Provider> <ClockContainer.Provider>
<div> <div>
<Link href="/"> <Link href="/">go to Index</Link>
<a>go to Index</a>
</Link>
<br /> <br />
<br /> <br />
<div> <div>
......
...@@ -9,9 +9,7 @@ export default function Index() { ...@@ -9,9 +9,7 @@ export default function Index() {
<CounterContainer.Provider> <CounterContainer.Provider>
<ClockContainer.Provider> <ClockContainer.Provider>
<div> <div>
<Link href="/about"> <Link href="/about">go to About</Link>
<a>go to About</a>
</Link>
<br /> <br />
<br /> <br />
<div> <div>
......
...@@ -7,10 +7,8 @@ export default function Home({ pokemons }) { ...@@ -7,10 +7,8 @@ export default function Home({ pokemons }) {
{pokemons.map((pokemon) => ( {pokemons.map((pokemon) => (
<li key={pokemon.name}> <li key={pokemon.name}>
<Link as={`/pokemon/${pokemon.name}`} href="/pokemon/[name]"> <Link as={`/pokemon/${pokemon.name}`} href="/pokemon/[name]">
<a> <h2 style={{ textTransform: 'capitalize' }}>{pokemon.name}</h2>
<h2 style={{ textTransform: 'capitalize' }}>{pokemon.name}</h2> <img src={pokemon.image} alt={`${pokemon.name} picture`} />
<img src={pokemon.image} alt={`${pokemon.name} picture`} />
</a>
</Link> </Link>
</li> </li>
))} ))}
......
...@@ -5,9 +5,7 @@ export default function Index({ stars }) { ...@@ -5,9 +5,7 @@ export default function Index({ stars }) {
return ( return (
<div> <div>
<p>Next.js has {stars} ⭐️</p> <p>Next.js has {stars} ⭐️</p>
<Link href="/preact"> <Link href="/preact">How about preact?</Link>
<a>How about preact?</a>
</Link>
</div> </div>
) )
} }
......
...@@ -5,9 +5,7 @@ export default function Preact({ stars }) { ...@@ -5,9 +5,7 @@ export default function Preact({ stars }) {
return ( return (
<div> <div>
<p>Preact has {stars} ⭐</p> <p>Preact has {stars} ⭐</p>
<Link href="/"> <Link href="/">I bet Next.js has more stars (?)</Link>
<a>I bet Next.js has more stars (?)</a>
</Link>
</div> </div>
) )
} }
......
...@@ -16,9 +16,7 @@ const Page = ({ router: { query } }) => { ...@@ -16,9 +16,7 @@ const Page = ({ router: { query } }) => {
return ( return (
<div> <div>
<RustComponent number={number} /> <RustComponent number={number} />
<Link href={`/?number=${number + 1}`}> <Link href={`/?number=${number + 1}`}>+</Link>
<a>+</a>
</Link>
</div> </div>
) )
} }
......
...@@ -7,14 +7,10 @@ export default function Blog() { ...@@ -7,14 +7,10 @@ export default function Blog() {
<h3>This is our blog</h3> <h3>This is our blog</h3>
<ul> <ul>
<li> <li>
<Link href="/post/1"> <Link href="/post/1">Post 1</Link>
<a>Post 1</a>
</Link>
</li> </li>
<li> <li>
<Link href="/post/2"> <Link href="/post/2">Post 2</Link>
<a>Post 2</a>
</Link>
</li> </li>
</ul> </ul>
<a href="/">Home</a> <a href="/">Home</a>
......
...@@ -7,9 +7,7 @@ export default function Post() { ...@@ -7,9 +7,7 @@ export default function Post() {
<div> <div>
<h3>Post #{router.query.id}</h3> <h3>Post #{router.query.id}</h3>
<p>Lorem ipsum</p> <p>Lorem ipsum</p>
<Link href="/"> <Link href="/">Back to blog</Link>
<a>Back to blog</a>
</Link>
</div> </div>
) )
} }
...@@ -4,9 +4,7 @@ const About = () => ( ...@@ -4,9 +4,7 @@ const About = () => (
<div> <div>
<p>This is the about page.</p> <p>This is the about page.</p>
<div> <div>
<Link href="/"> <Link href="/">Go Back</Link>
<a>Go Back</a>
</Link>
</div> </div>
<img width={200} src="/static/vercel.png" /> <img width={200} src="/static/vercel.png" />
</div> </div>
......
...@@ -13,9 +13,7 @@ export default function Home() { ...@@ -13,9 +13,7 @@ export default function Home() {
<a href="/blog">Blog</a> <a href="/blog">Blog</a>
</div> </div>
<div> <div>
<Link href="/about"> <Link href="/about">About us</Link>
<a>About us</a>
</Link>
</div> </div>
<Image <Image
src="/static/nextjs.png" src="/static/nextjs.png"
......
...@@ -3,13 +3,13 @@ import Link from 'next/link' ...@@ -3,13 +3,13 @@ import Link from 'next/link'
const Nav = () => { const Nav = () => {
return ( return (
<nav> <nav>
<Link href="/"> <Link href="/" legacyBehavior>
<a>Index</a> <a>Index</a>
</Link> </Link>
<Link href="/ssg"> <Link href="/ssg" legacyBehavior>
<a>SSG</a> <a>SSG</a>
</Link> </Link>
<Link href="/ssr"> <Link href="/ssr" legacyBehavior>
<a>SSR</a> <a>SSR</a>
</Link> </Link>
<style jsx> <style jsx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment