Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ab42da06
Unverified
Commit
ab42da06
authored
Oct 30, 2022
by
Tim Neutkens
Committed by
GitHub
Oct 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run next/link codemod for Next.js 13 on examples (#41913)
parent
8ada894a
Hide whitespace changes
Inline
Side-by-side
Showing
273 changed files
with
753 additions
and
1028 deletions
+753
-1028
ActiveLink.tsx
examples/active-class-name/components/ActiveLink.tsx
+1
-1
index.tsx
examples/analyze-bundles/pages/index.tsx
+1
-3
about.js
...s/api-routes-apollo-server-and-client-auth/pages/about.js
+1
-5
index.js
...s/api-routes-apollo-server-and-client-auth/pages/index.js
+2
-8
signin.js
.../api-routes-apollo-server-and-client-auth/pages/signin.js
+1
-3
signup.js
.../api-routes-apollo-server-and-client-auth/pages/signup.js
+1
-3
about.js
examples/api-routes-apollo-server-and-client/pages/about.js
+1
-5
index.js
examples/api-routes-apollo-server-and-client/pages/index.js
+1
-4
index.js
examples/api-routes-apollo-server/pages/index.js
+1
-1
index.tsx
examples/api-routes-rest/pages/index.tsx
+1
-1
Person.tsx
examples/api-routes/components/Person.tsx
+1
-1
header.tsx
examples/auth0/components/header.tsx
+5
-5
index.tsx
examples/basic-export/pages/index.tsx
+1
-4
cover-image.tsx
examples/blog-starter/components/cover-image.tsx
+2
-2
header.tsx
examples/blog-starter/components/header.tsx
+2
-2
hero-post.tsx
examples/blog-starter/components/hero-post.tsx
+6
-2
post-preview.tsx
examples/blog-starter/components/post-preview.tsx
+6
-2
index.tsx
examples/blog-with-comment/pages/posts/index.tsx
+6
-2
cover-image.tsx
examples/cms-agilitycms/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-agilitycms/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-agilitycms/components/hero-post.tsx
+2
-2
post-preview.tsx
examples/cms-agilitycms/components/post-preview.tsx
+2
-2
cover-image.js
examples/cms-builder-io/components/cover-image.js
+2
-2
header.js
examples/cms-builder-io/components/header.js
+2
-2
hero-post.js
examples/cms-builder-io/components/hero-post.js
+2
-2
post-preview.js
examples/cms-builder-io/components/post-preview.js
+2
-2
blog.js
examples/cms-buttercms/components/blog/blog.js
+2
-2
categories-widget.js
examples/cms-buttercms/components/blog/categories-widget.js
+1
-1
post-preview-condensed.js
...s/cms-buttercms/components/blog/post-preview-condensed.js
+3
-5
post-preview.js
examples/cms-buttercms/components/blog/post-preview.js
+4
-8
blog.js
examples/cms-buttercms/pages/blog.js
+1
-3
[slug].js
examples/cms-buttercms/pages/blog/[slug].js
+3
-9
[slug].js
examples/cms-buttercms/pages/blog/category/[slug].js
+2
-6
search.js
examples/cms-buttercms/pages/blog/search.js
+2
-6
[slug].js
examples/cms-buttercms/pages/blog/tag/[slug].js
+2
-6
cover-image.js
examples/cms-contentful/components/cover-image.js
+2
-2
header.js
examples/cms-contentful/components/header.js
+2
-2
hero-post.js
examples/cms-contentful/components/hero-post.js
+2
-2
post-preview.js
examples/cms-contentful/components/post-preview.js
+2
-2
cover-image.tsx
examples/cms-cosmic/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-cosmic/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-cosmic/components/hero-post.tsx
+2
-2
post-preview.tsx
examples/cms-cosmic/components/post-preview.tsx
+2
-2
cover-image.js
examples/cms-datocms/components/cover-image.js
+2
-2
header.js
examples/cms-datocms/components/header.js
+2
-2
hero-post.js
examples/cms-datocms/components/hero-post.js
+2
-2
post-preview.js
examples/cms-datocms/components/post-preview.js
+2
-2
blocks.tsx
examples/cms-dotcms/components/blocks.tsx
+1
-1
cover-image.tsx
examples/cms-dotcms/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-dotcms/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-dotcms/components/hero-post.tsx
+6
-2
post-preview.tsx
examples/cms-dotcms/components/post-preview.tsx
+2
-2
cover-image.js
examples/cms-drupal/components/cover-image.js
+2
-2
header.js
examples/cms-drupal/components/header.js
+2
-2
hero-post.js
examples/cms-drupal/components/hero-post.js
+5
-6
post-preview.js
examples/cms-drupal/components/post-preview.js
+5
-6
cover-image.tsx
examples/cms-enterspeed/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-enterspeed/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-enterspeed/components/hero-post.tsx
+5
-6
post-preview.tsx
examples/cms-enterspeed/components/post-preview.tsx
+2
-2
cover-image.js
examples/cms-ghost/components/cover-image.js
+2
-2
header.js
examples/cms-ghost/components/header.js
+2
-2
hero-post.js
examples/cms-ghost/components/hero-post.js
+2
-2
post-preview.js
examples/cms-ghost/components/post-preview.js
+2
-2
cover-image.js
examples/cms-graphcms/components/cover-image.js
+2
-2
header.js
examples/cms-graphcms/components/header.js
+2
-2
hero-post.js
examples/cms-graphcms/components/hero-post.js
+2
-2
post-preview.js
examples/cms-graphcms/components/post-preview.js
+2
-2
index.tsx
examples/cms-keystonejs-embedded/pages/index.tsx
+9
-10
[slug].tsx
examples/cms-keystonejs-embedded/pages/post/[slug].tsx
+1
-3
cover-image.js
examples/cms-kontent/components/cover-image.js
+2
-2
header.js
examples/cms-kontent/components/header.js
+2
-2
hero-post.js
examples/cms-kontent/components/hero-post.js
+2
-2
post-preview.js
examples/cms-kontent/components/post-preview.js
+2
-2
cover-image.js
examples/cms-prepr/components/cover-image.js
+2
-2
header.js
examples/cms-prepr/components/header.js
+2
-2
hero-post.js
examples/cms-prepr/components/hero-post.js
+2
-2
post-preview.js
examples/cms-prepr/components/post-preview.js
+2
-2
cover-image.tsx
examples/cms-prismic/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-prismic/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-prismic/components/hero-post.tsx
+2
-4
post-preview.tsx
examples/cms-prismic/components/post-preview.tsx
+2
-4
cover-image.js
examples/cms-sanity/components/cover-image.js
+2
-2
header.js
examples/cms-sanity/components/header.js
+2
-2
hero-post.js
examples/cms-sanity/components/hero-post.js
+2
-2
post-preview.js
examples/cms-sanity/components/post-preview.js
+2
-2
cover-image.tsx
examples/cms-sitefinity/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-sitefinity/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-sitefinity/components/hero-post.tsx
+6
-2
post-preview.tsx
examples/cms-sitefinity/components/post-preview.tsx
+6
-2
cover-image.js
examples/cms-storyblok/components/cover-image.js
+2
-2
header.js
examples/cms-storyblok/components/header.js
+2
-2
hero-post.js
examples/cms-storyblok/components/hero-post.js
+2
-2
post-preview.js
examples/cms-storyblok/components/post-preview.js
+2
-2
cover-image.js
examples/cms-strapi/components/cover-image.js
+2
-2
header.js
examples/cms-strapi/components/header.js
+2
-2
hero-post.js
examples/cms-strapi/components/hero-post.js
+2
-2
post-preview.js
examples/cms-strapi/components/post-preview.js
+2
-2
cover-image.js
examples/cms-takeshape/components/cover-image.js
+2
-2
header.js
examples/cms-takeshape/components/header.js
+2
-2
hero-post.js
examples/cms-takeshape/components/hero-post.js
+2
-2
post-preview.js
examples/cms-takeshape/components/post-preview.js
+2
-2
cover-image.js
examples/cms-tina/components/cover-image.js
+2
-2
header.js
examples/cms-tina/components/header.js
+2
-2
hero-post.js
examples/cms-tina/components/hero-post.js
+2
-2
post-preview.js
examples/cms-tina/components/post-preview.js
+2
-2
cover-image.js
examples/cms-umbraco-heartcore/components/cover-image.js
+2
-2
header.js
examples/cms-umbraco-heartcore/components/header.js
+2
-2
hero-post.js
examples/cms-umbraco-heartcore/components/hero-post.js
+2
-2
post-preview.js
examples/cms-umbraco-heartcore/components/post-preview.js
+2
-2
cover-image.tsx
examples/cms-webiny/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-webiny/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-webiny/components/hero-post.tsx
+2
-2
post-preview.tsx
examples/cms-webiny/components/post-preview.tsx
+2
-2
cover-image.tsx
examples/cms-wordpress/components/cover-image.tsx
+2
-2
header.tsx
examples/cms-wordpress/components/header.tsx
+2
-2
hero-post.tsx
examples/cms-wordpress/components/hero-post.tsx
+5
-6
post-preview.tsx
examples/cms-wordpress/components/post-preview.tsx
+5
-6
index.js
examples/custom-server-actionhero/pages/index.js
+2
-2
index.js
examples/custom-server-express/pages/index.js
+2
-2
index.js
examples/custom-server-fastify/pages/index.js
+2
-2
index.tsx
examples/custom-server-hapi/pages/index.tsx
+2
-2
index.js
examples/custom-server-koa/pages/index.js
+2
-6
index.js
examples/custom-server-polka/pages/index.js
+2
-2
index.tsx
examples/data-fetch/pages/index.tsx
+1
-3
preact-stars.tsx
examples/data-fetch/pages/preact-stars.tsx
+1
-3
header.tsx
examples/dynamic-routing/components/header.tsx
+4
-12
index.tsx
examples/dynamic-routing/pages/post/[id]/index.tsx
+2
-6
index.tsx
examples/headers/pages/index.tsx
+4
-1
index.tsx
examples/hello-world/pages/index.tsx
+1
-4
locale-switcher.tsx
examples/i18n-routing/components/locale-switcher.tsx
+6
-1
index.tsx
examples/image-component/pages/index.tsx
+6
-18
index.tsx
examples/image-legacy-component/pages/index.tsx
+8
-20
sidebar.tsx
examples/layout-component/components/sidebar.tsx
+3
-9
index.tsx
examples/middleware/pages/index.tsx
+3
-3
index.tsx
examples/next-forms/pages/index.tsx
+6
-10
js-form.tsx
examples/next-forms/pages/js-form.tsx
+1
-5
no-js-form.tsx
examples/next-forms/pages/no-js-form.tsx
+1
-5
index.tsx
examples/redirects/pages/index.tsx
+4
-1
index.tsx
examples/rewrites/pages/index.tsx
+4
-1
index.tsx
examples/using-preact/pages/index.tsx
+3
-9
index.tsx
examples/with-ant-design/pages/index.tsx
+2
-4
Nav.js
examples/with-apollo-and-redux/components/Nav.js
+3
-3
[name].js
examples/with-apollo-neo4j-graphql/pages/actor/[name].js
+2
-1
index.js
examples/with-apollo-neo4j-graphql/pages/index.js
+2
-0
[title].js
examples/with-apollo-neo4j-graphql/pages/movie/[title].js
+1
-1
Header.js
examples/with-apollo/components/Header.js
+4
-4
Page.js
examples/with-cerebral/components/Page.js
+1
-3
Header.js
examples/with-clerk/components/Header.js
+3
-5
_app.js
examples/with-clerk/pages/_app.js
+2
-5
index.js
examples/with-clerk/pages/index.js
+55
-50
index.js
examples/with-contentlayer/pages/index.js
+1
-3
about.tsx
examples/with-context-api/pages/about.tsx
+1
-3
index.tsx
examples/with-context-api/pages/index.tsx
+1
-3
header.js
examples/with-cookie-auth-fauna/components/header.js
+4
-4
about.tsx
examples/with-cypress/pages/about.tsx
+1
-3
index.tsx
examples/with-cypress/pages/index.tsx
+3
-5
Header.tsx
examples/with-dynamic-import/components/Header.tsx
+4
-4
Header.tsx
examples/with-edgedb/components/Header.tsx
+3
-3
Post.tsx
examples/with-edgedb/components/Post.tsx
+1
-1
create.tsx
examples/with-edgedb/pages/create.tsx
+1
-1
Layout.tsx
...s/with-electron-typescript/renderer/components/Layout.tsx
+2
-11
ListItem.tsx
...with-electron-typescript/renderer/components/ListItem.tsx
+1
-3
about.tsx
examples/with-electron-typescript/renderer/pages/about.tsx
+1
-3
index.tsx
examples/with-electron-typescript/renderer/pages/index.tsx
+1
-3
initial-props.tsx
...with-electron-typescript/renderer/pages/initial-props.tsx
+1
-3
index.js
examples/with-facebook-pixel/pages/index.js
+1
-3
navigation.js
examples/with-facebook-pixel/pages/navigation.js
+1
-3
Nav.tsx
examples/with-fingerprintjs-pro/components/Nav.tsx
+2
-1
Header.jsx
examples/with-firebase-hosting/src/components/Header.jsx
+4
-4
index.js
examples/with-firebase/pages/index.js
+1
-1
_app.js
examples/with-flow/pages/_app.js
+2
-11
Gallery.js
examples/with-framer-motion/components/Gallery.js
+6
-1
SingleImage.js
examples/with-framer-motion/components/SingleImage.js
+1
-3
Header.js
examples/with-google-analytics-amp/components/Header.js
+3
-9
Header.js
examples/with-google-analytics/components/Header.js
+3
-9
header.js
examples/with-graphql-hooks/components/header.js
+2
-2
about.js
examples/with-http2/pages/about.js
+1
-3
index.js
examples/with-http2/pages/index.js
+1
-3
Navigation.js
examples/with-i18n-next-intl/components/Navigation.js
+3
-7
index.js
examples/with-i18n-rosetta/pages/[lng]/index.js
+1
-1
Header.tsx
examples/with-iron-session/components/Header.tsx
+4
-4
LangSwitcher.js
examples/with-lingui/components/LangSwitcher.js
+6
-4
index.js
examples/with-lingui/pages/index.js
+1
-3
two.js
examples/with-lingui/pages/two.js
+1
-3
_app.tsx
examples/with-loading/pages/_app.tsx
+3
-3
header.js
examples/with-magic/components/header.js
+3
-3
CustomLink.js
examples/with-mdx-remote/components/CustomLink.js
+1
-1
index.js
examples/with-mdx-remote/pages/index.js
+1
-1
[slug].js
examples/with-mdx-remote/pages/posts/[slug].js
+1
-1
SampleComponent.tsx
examples/with-mobx-state-tree/components/SampleComponent.tsx
+1
-3
Page.js
examples/with-mobx/components/Page.js
+1
-3
index.js
examples/with-mongodb-mongoose/pages/[id]/index.js
+1
-1
_app.js
examples/with-mongodb-mongoose/pages/_app.js
+2
-6
index.js
examples/with-mongodb-mongoose/pages/index.js
+2
-2
[id].js
examples/with-mux-video/pages/asset/[id].js
+1
-5
[id].js
examples/with-mux-video/pages/v/[id].js
+1
-1
[name].js
examples/with-neo4j/pages/actor/[name].js
+2
-1
index.js
examples/with-neo4j/pages/index.js
+8
-2
[title].js
examples/with-neo4j/pages/movie/[title].js
+6
-2
layout.js
examples/with-netlify-cms/components/layout.js
+3
-3
index.js
examples/with-netlify-cms/pages/blog/index.js
+5
-1
about.js
examples/with-next-page-transitions/pages/about.js
+2
-2
index.js
examples/with-next-page-transitions/pages/index.js
+2
-2
index.js
examples/with-next-seo/pages/index.js
+2
-5
index.tsx
examples/with-next-sitemap/pages/index.tsx
+5
-5
index.js
examples/with-next-translate/pages/index.js
+4
-4
Header.js
examples/with-overmind/components/Header.js
+2
-6
Navbar.js
examples/with-passport-and-next-connect/components/Navbar.js
+12
-4
form.js
examples/with-passport/components/form.js
+2
-2
header.js
examples/with-passport/components/header.js
+3
-3
Header.js
examples/with-plausible/components/Header.js
+3
-9
about.js
examples/with-playwright/pages/about.js
+1
-3
index.js
examples/with-playwright/pages/index.js
+3
-5
Nav.tsx
examples/with-prefetching/components/Nav.tsx
+4
-4
Layout.js
examples/with-rbx-bulma-pro/components/Layout.js
+3
-3
index.js
examples/with-rbx-bulma-pro/pages/index.js
+9
-15
index.tsx
examples/with-react-foundation/src/pages/index.tsx
+1
-1
index.js
examples/with-react-ga/pages/index.js
+1
-4
Nav.tsx
examples/with-react-intl/components/Nav.tsx
+10
-17
LinkUnstyled.tsx
...ples/with-react-md-typescript/components/LinkUnstyled.tsx
+2
-1
LinkUnstyled.jsx
examples/with-react-md/components/LinkUnstyled.jsx
+2
-1
index.js
examples/with-redux-observable/pages/index.js
+1
-3
other.js
examples/with-redux-observable/pages/other.js
+1
-3
page.js
examples/with-redux-saga/components/page.js
+1
-3
index.js
examples/with-redux-thunk/pages/index.js
+1
-3
show-redux-state.js
examples/with-redux-thunk/pages/show-redux-state.js
+1
-3
Page.js
examples/with-redux-wrapper/components/Page.js
+1
-3
about.js
examples/with-relay-modern/pages/about.js
+1
-3
index.js
examples/with-relay-modern/pages/index.js
+1
-3
Grid.js
examples/with-route-as-modal/components/Grid.js
+14
-4
Header.js
examples/with-segment-analytics/components/Header.js
+3
-9
index.js
examples/with-sentry/pages/index.js
+6
-24
ProductCard.js
examples/with-sfcc/components/ProductCard.js
+22
-24
index.js
examples/with-shallow-routing/pages/index.js
+1
-3
post.tsx
examples/with-static-export/components/post.tsx
+1
-3
[id].tsx
examples/with-static-export/pages/post/[id].tsx
+1
-3
Page.tsx
examples/with-storybook-styled-jsx-scss/components/Page.tsx
+16
-4
Layout.tsx
examples/with-stripe-typescript/components/Layout.tsx
+2
-4
index.tsx
examples/with-stripe-typescript/pages/index.tsx
+18
-15
cards.tsx
examples/with-styled-components/components/cards.tsx
+1
-1
about.tsx
examples/with-styled-components/pages/about.tsx
+1
-3
index.js
examples/with-supabase-auth-realtime-db/pages/index.js
+1
-3
profile.js
examples/with-supabase-auth-realtime-db/pages/profile.js
+1
-3
Layout.tsx
examples/with-temporal/components/Layout.tsx
+1
-7
about.tsx
examples/with-temporal/pages/about.tsx
+1
-3
index.tsx
examples/with-temporal/pages/index.tsx
+1
-3
nav.js
examples/with-tesfy/components/nav.js
+1
-6
index.js
examples/with-three-js/pages/index.js
+2
-6
GlobalNav.tsx
examples/with-turbopack/app/GlobalNav.tsx
+1
-0
page.tsx
examples/with-turbopack/app/page.tsx
+1
-0
SectionLink.tsx
examples/with-turbopack/ui/SectionLink.tsx
+1
-1
TabNavItem.tsx
examples/with-turbopack/ui/TabNavItem.tsx
+1
-0
about.tsx
examples/with-typescript-graphql/pages/about.tsx
+1
-5
index.tsx
examples/with-typescript-graphql/pages/index.tsx
+1
-4
Layout.tsx
examples/with-typescript/components/Layout.tsx
+3
-12
ListItem.tsx
examples/with-typescript/components/ListItem.tsx
+1
-3
about.tsx
examples/with-typescript/pages/about.tsx
+1
-3
index.tsx
examples/with-typescript/pages/index.tsx
+1
-3
index.tsx
examples/with-typescript/pages/users/index.tsx
+1
-3
index.tsx
examples/with-unsplash/components/Collections/index.tsx
+11
-13
index.tsx
examples/with-unsplash/components/User/index.tsx
+8
-12
about.js
examples/with-unstated/pages/about.js
+1
-3
index.js
examples/with-unstated/pages/index.js
+1
-3
index.js
examples/with-urql/pages/index.js
+2
-4
index.js
examples/with-vercel-fetch/pages/index.js
+1
-3
preact.js
examples/with-vercel-fetch/pages/preact.js
+1
-3
index.js
examples/with-webassembly/pages/index.js
+1
-3
index.js
examples/with-zones/blog/pages/index.js
+2
-6
[id].js
examples/with-zones/blog/pages/post/[id].js
+1
-3
about.js
examples/with-zones/home/pages/about.js
+1
-3
index.js
examples/with-zones/home/pages/index.js
+1
-3
nav.js
examples/with-zustand/components/nav.js
+3
-3
No files found.
examples/active-class-name/components/ActiveLink.tsx
View file @
ab42da06
...
...
@@ -52,7 +52,7 @@ const ActiveLink = ({
])
return
(
<
Link
{
...
props
}
>
<
Link
{
...
props
}
legacyBehavior
>
{
React
.
cloneElement
(
child
,
{
className
:
className
||
null
,
})
}
...
...
examples/analyze-bundles/pages/index.tsx
View file @
ab42da06
...
...
@@ -12,9 +12,7 @@ const Index: NextPage<IndexProps> = ({ name }) => {
<
h1
>
Home Page
</
h1
>
<
p
>
Welcome,
{
name
}
</
p
>
<
div
>
<
Link
href=
"/about"
>
<
a
>
About Page
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About Page
</
Link
>
</
div
>
</
div
>
)
...
...
examples/api-routes-apollo-server-and-client-auth/pages/about.js
View file @
ab42da06
...
...
@@ -3,11 +3,7 @@ import Link from 'next/link'
export
default
function
About
()
{
return
(
<
div
>
Welcome
to
the
about
page
.
Go
to
the
{
' '
}
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link>{' '
}
page
.
Welcome
to
the
about
page
.
Go
to
the
<
Link
href
=
"/"
>
Home
<
/Link> page
.
<
/div
>
)
}
examples/api-routes-apollo-server-and-client-auth/pages/index.js
View file @
ab42da06
...
...
@@ -32,14 +32,8 @@ const Index = () => {
if
(
viewer
)
{
return
(
<
div
>
You
're signed in as {viewer.email} goto{'
'}
<Link href="/about">
<a>about</a>
</Link>{'
'}
page. or{'
'}
<Link href="/signout">
<a>signout</a>
</Link>
You
're signed in as {viewer.email} goto <Link href="/about">about</Link>{'
'}
page. or <Link href="/signout">signout</Link>
</div>
)
}
...
...
examples/api-routes-apollo-server-and-client-auth/pages/signin.js
View file @
ab42da06
...
...
@@ -65,9 +65,7 @@ function SignIn() {
label
=
"Password"
/>
<
button
type
=
"submit"
>
Sign
in
<
/button> or{' '
}
<
Link
href
=
"/signup"
>
<
a
>
Sign
up
<
/a
>
<
/Link
>
<
Link
href
=
"/signup"
>
Sign
up
<
/Link
>
<
/form
>
<
/
>
)
...
...
examples/api-routes-apollo-server-and-client-auth/pages/signup.js
View file @
ab42da06
...
...
@@ -60,9 +60,7 @@ function SignUp() {
label
=
"Password"
/>
<
button
type
=
"submit"
>
Sign
up
<
/button> or{' '
}
<
Link
href
=
"/signin"
>
<
a
>
Sign
in
<
/a
>
<
/Link
>
<
Link
href
=
"/signin"
>
Sign
in
<
/Link
>
<
/form
>
<
/
>
)
...
...
examples/api-routes-apollo-server-and-client/pages/about.js
View file @
ab42da06
...
...
@@ -3,11 +3,7 @@ import Link from 'next/link'
export
default
function
About
()
{
return
(
<
div
>
This
is
a
static
page
goto
{
' '
}
<
Link
href
=
"/"
>
<
a
>
dynamic
<
/a
>
<
/Link>{' '
}
page
.
This
is
a
static
page
goto
<
Link
href
=
"/"
>
dynamic
<
/Link> page
.
<
/div
>
)
}
examples/api-routes-apollo-server-and-client/pages/index.js
View file @
ab42da06
...
...
@@ -21,10 +21,7 @@ const Index = () => {
return
(
<
div
>
You
're signed in as {viewer.name} and you'
re
{
viewer
.
status
}
goto
{
' '
}
<
Link
href
=
"/about"
>
<
a
>
static
<
/a
>
<
/Link>{' '
}
page
.
<
Link
href
=
"/about"
>
static
<
/Link> page
.
<
/div
>
)
}
...
...
examples/api-routes-apollo-server/pages/index.js
View file @
ab42da06
...
...
@@ -10,7 +10,7 @@ export default function UserListing({ users }) {
{
users
.
map
((
user
)
=>
(
<
li
key
=
{
user
.
username
}
>
<
Link
href
=
"/[username]"
as
=
{
`/
${
user
.
username
}
`
}
>
<
a
>
{
user
.
name
}
<
/a
>
{
user
.
name
}
<
/Link
>
<
/li
>
))}
...
...
examples/api-routes-rest/pages/index.tsx
View file @
ab42da06
...
...
@@ -14,7 +14,7 @@ export default function Index() {
<
ul
>
{
data
.
map
((
user
)
=>
(
<
li
key=
{
user
.
id
}
>
<
Link
href=
"/user/[id]"
as=
{
`/user/${user.id}`
}
>
<
Link
href=
"/user/[id]"
as=
{
`/user/${user.id}`
}
legacyBehavior
>
{
`User ${user.id}`
}
</
Link
>
</
li
>
...
...
examples/api-routes/components/Person.tsx
View file @
ab42da06
...
...
@@ -9,7 +9,7 @@ export default function PersonComponent({ person }: PersonProps) {
return
(
<
li
>
<
Link
href=
"/person/[id]"
as=
{
`/person/${person.id}`
}
>
<
a
>
{
person
.
name
}
</
a
>
{
person
.
name
}
</
Link
>
</
li
>
)
...
...
examples/auth0/components/header.tsx
View file @
ab42da06
...
...
@@ -11,17 +11,17 @@ const Header = ({ user, loading }: HeaderProps) => {
<
nav
>
<
ul
>
<
li
>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
>
Home
</
a
>
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/about"
>
<
Link
href=
"/about"
legacyBehavior
>
<
a
>
About
</
a
>
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/advanced/api-profile"
>
<
Link
href=
"/advanced/api-profile"
legacyBehavior
>
<
a
>
API rendered profile (advanced)
</
a
>
</
Link
>
</
li
>
...
...
@@ -29,12 +29,12 @@ const Header = ({ user, loading }: HeaderProps) => {
(
user
?
(
<>
<
li
>
<
Link
href=
"/profile"
>
<
Link
href=
"/profile"
legacyBehavior
>
<
a
>
Client rendered profile
</
a
>
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/advanced/ssr-profile"
>
<
Link
href=
"/advanced/ssr-profile"
legacyBehavior
>
<
a
>
Server rendered profile (advanced)
</
a
>
</
Link
>
</
li
>
...
...
examples/basic-export/pages/index.tsx
View file @
ab42da06
...
...
@@ -3,10 +3,7 @@ import Link from 'next/link'
const
Home
=
()
=>
{
return
(
<
div
>
Hello World.
{
' '
}
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
Hello World.
<
Link
href=
"/about"
>
About
</
Link
>
</
div
>
)
}
...
...
examples/blog-starter/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/blog-starter/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
const
Header
=
()
=>
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/blog-starter/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-5xl leading-tight"
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/blog-starter/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -27,8 +27,12 @@ const PostPreview = ({
<
CoverImage
slug=
{
slug
}
title=
{
title
}
src=
{
coverImage
}
/>
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/blog-with-comment/pages/posts/index.tsx
View file @
ab42da06
...
...
@@ -12,8 +12,12 @@ export default function NotePage({
{
allPosts
.
length
?
(
allPosts
.
map
((
post
)
=>
(
<
article
key=
{
post
.
slug
}
className=
"mb-10"
>
<
Link
as=
{
`/posts/${post.slug}`
}
href=
"/posts/[slug]"
>
<
a
className=
"text-lg leading-6 font-bold"
>
{
post
.
title
}
</
a
>
<
Link
as=
{
`/posts/${post.slug}`
}
href=
"/posts/[slug]"
className=
"text-lg leading-6 font-bold"
>
{
post
.
title
}
</
Link
>
<
p
>
{
post
.
excerpt
}
</
p
>
<
div
className=
"text-gray-400"
>
...
...
examples/cms-agilitycms/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -16,8 +16,8 @@ export default function CoverImage({ title, responsiveImage, slug = null }) {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-agilitycms/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-agilitycms/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-agilitycms/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -21,8 +21,8 @@ export default function PostPreview({
/>
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/cms-builder-io/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-builder-io/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-builder-io/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-builder-io/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
title
=
{
title
}
slug
=
{
slug
}
url
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-buttercms/components/blog/blog.js
View file @
ab42da06
...
...
@@ -15,8 +15,8 @@ export default function Blog({ posts }) {
simple
to
launch
a
new
company
blog
.
<
/p
>
<
p
>
<
Link
href
=
{
`/blog`
}
>
<
a
className
=
"main-btn btn-hover mt-5"
>
View
All
Blog
Posts
<
/a
>
<
Link
href
=
{
`/blog`
}
className
=
"main-btn btn-hover mt-5"
>
View
All
Blog
Posts
<
/Link
>
<
/p
>
<
/div
>
...
...
examples/cms-buttercms/components/blog/categories-widget.js
View file @
ab42da06
...
...
@@ -8,7 +8,7 @@ export default function CategoriesWidget({ categories }) {
{
categories
.
map
((
category
)
=>
(
<
li
key
=
{
category
.
slug
}
>
<
Link
href
=
{
`/blog/category/
${
category
.
slug
}
`
}
>
<
a
>
{
category
.
name
}
<
/a
>
{
category
.
name
}
<
/Link
>
<
/li
>
))}
...
...
examples/cms-buttercms/components/blog/post-preview-condensed.js
View file @
ab42da06
...
...
@@ -23,15 +23,13 @@ export default function PostPreviewCondensed({
)}
<
div
className
=
"blog-body"
>
<
h5
className
=
"package-name"
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
<
a
>
{
title
}
<
/a
>
<
/Link
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
{
title
}
<
/Link
>
<
/h5
>
<
p
>
{
excerpt
}
<
/p
>
<
/div
>
<
div
className
=
"blog-footer"
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
<
a
className
=
"main-btn btn-hover"
>
Read
More
<
/a
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
className
=
"main-btn btn-hover"
>
Read
More
<
/Link
>
<
/div
>
<
/div
>
...
...
examples/cms-buttercms/components/blog/post-preview.js
View file @
ab42da06
...
...
@@ -19,9 +19,7 @@ export default function PostsPreview({
<
div
className
=
"blog-roll-card"
>
<
div
className
=
"blog-roll-card-meta"
>
<
h2
className
=
"blog-roll-card-header"
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
<
a
>
{
title
}
<
/a
>
<
/Link
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
{
title
}
<
/Link
>
<
/h2
>
<
ul
className
=
"blog-roll-card-meta-info"
>
<
li
>
...
...
@@ -34,9 +32,7 @@ export default function PostsPreview({
{
tags
.
map
((
tag
)
=>
(
<
li
key
=
{
tag
.
slug
}
>
<
Link
href
=
{
`/blog/tag/
${
tag
.
slug
}
`
}
>
<
a
>
<
i
className
=
"lni lni-tag"
><
/i> {tag.name
}
<
/a
>
<
i
className
=
"lni lni-tag"
><
/i> {tag.name
}
<
/Link
>
<
/li
>
))}
...
...
@@ -57,8 +53,8 @@ export default function PostsPreview({
dangerouslySetInnerHTML
=
{{
__html
:
excerpt
}}
><
/div
>
<
div
className
=
"blog-roll-card-footer text-center"
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
>
<
a
className
=
"main-btn btn-hover"
>
Read
More
<
/a
>
<
Link
href
=
{
`/blog/
${
slug
}
`
}
className
=
"main-btn btn-hover"
>
Read
More
<
/Link
>
<
/div
>
<
/div
>
...
...
examples/cms-buttercms/pages/blog.js
View file @
ab42da06
...
...
@@ -19,9 +19,7 @@ export default function Blog({ posts, categories }) {
<
h2
>
All
Blog
Posts
<
/h2
>
<
ul
className
=
"breadcrumb-nav"
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
All
blog
posts
<
/li
>
<
/ul
>
...
...
examples/cms-buttercms/pages/blog/[slug].js
View file @
ab42da06
...
...
@@ -55,14 +55,10 @@ export default function BlogPost({ post, categories }) {
<
h2
>
{
post
.
title
}
<
/h2
>
<
ul
className
=
"breadcrumb-nav"
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/blog"
>
<
a
>
Blog
<
/a
>
<
/Link
>
<
Link
href
=
"/blog"
>
Blog
<
/Link
>
<
/li
>
<
li
>
{
post
.
title
}
<
/li
>
<
/ul
>
...
...
@@ -92,9 +88,7 @@ export default function BlogPost({ post, categories }) {
{
post
.
tags
.
map
((
tag
)
=>
(
<
li
key
=
{
tag
.
slug
}
>
<
Link
href
=
{
`/blog/tag/
${
tag
.
slug
}
`
}
>
<
a
>
<
i
className
=
"lni lni-tag"
><
/i> {tag.name
}
<
/a
>
<
i
className
=
"lni lni-tag"
><
/i> {tag.name
}
<
/Link
>
<
/li
>
))}
...
...
examples/cms-buttercms/pages/blog/category/[slug].js
View file @
ab42da06
...
...
@@ -19,14 +19,10 @@ export default function Category({ posts, categories, slug }) {
<
h2
>
Blog
Posts
by
Category
<
/h2
>
<
ul
className
=
"breadcrumb-nav"
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/blog"
>
<
a
>
Blog
<
/a
>
<
/Link
>
<
Link
href
=
"/blog"
>
Blog
<
/Link
>
<
/li
>
<
li
>
Category
:
{
slug
}
<
/li
>
<
/ul
>
...
...
examples/cms-buttercms/pages/blog/search.js
View file @
ab42da06
...
...
@@ -19,14 +19,10 @@ export default function Search({ posts, categories, query }) {
<
h2
>
Search
Results
<
/h2
>
<
ul
className
=
"breadcrumb-nav"
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/blog"
>
<
a
>
Blog
<
/a
>
<
/Link
>
<
Link
href
=
"/blog"
>
Blog
<
/Link
>
<
/li
>
<
li
>
Search
:
&
#
34
;{
query
}
&
#
34
;
<
/li
>
<
/ul
>
...
...
examples/cms-buttercms/pages/blog/tag/[slug].js
View file @
ab42da06
...
...
@@ -19,14 +19,10 @@ export default function Tag({ posts, categories, slug }) {
<
h2
>
Blog
Posts
by
Tag
<
/h2
>
<
ul
className
=
"breadcrumb-nav"
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/blog"
>
<
a
>
Blog
<
/a
>
<
/Link
>
<
Link
href
=
"/blog"
>
Blog
<
/Link
>
<
/li
>
<
li
>
Tag
:
{
slug
}
<
/li
>
<
/ul
>
...
...
examples/cms-contentful/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-contentful/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-contentful/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-contentful/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
title
=
{
title
}
slug
=
{
slug
}
url
=
{
coverImage
.
url
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-cosmic/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -31,8 +31,8 @@ const CoverImage = (props: CoverImageProps) => {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-cosmic/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
const
Header
=
()
=>
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-cosmic/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-cosmic/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -22,8 +22,8 @@ const PostPreview = (props: PostPreviewProps) => {
<
CoverImage
slug=
{
slug
}
title=
{
title
}
url=
{
coverImage
.
imgix_url
}
/>
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/cms-datocms/components/cover-image.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function CoverImage({ title, responsiveImage, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-datocms/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-datocms/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-datocms/components/post-preview.js
View file @
ab42da06
...
...
@@ -21,8 +21,8 @@ export default function PostPreview({
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-dotcms/components/blocks.tsx
View file @
ab42da06
...
...
@@ -14,7 +14,7 @@ export const DotLink = ({ attrs: { href, target }, children }) => {
{
children
}
</
a
>
)
:
(
<
Link
href=
{
href
}
target=
{
target
||
'_self'
}
>
<
Link
href=
{
href
}
target=
{
target
||
'_self'
}
legacyBehavior
>
{
children
}
</
Link
>
)
...
...
examples/cms-dotcms/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -16,8 +16,8 @@ export default function CoverImage(props) {
return
(
<
div
className=
"-mx-5 sm:mx-0"
>
{
props
.
slug
?
(
<
Link
href=
{
`/posts/${props.slug}`
}
>
<
a
aria
-
label=
{
props
.
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts/${props.slug}`
}
aria
-
label=
{
props
.
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-dotcms/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-dotcms/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
as=
{
`/posts/${slug}`
}
href=
"/posts/[slug]"
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-dotcms/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -25,8 +25,8 @@ export default function PostPreview({
/>
</
div
>
<
h3
className=
"mb-3 text-3xl leading-snug"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
{
date
!==
'now'
?
(
...
...
examples/cms-drupal/components/cover-image.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function CoverImage({ title, coverImage, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
slug
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
slug
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-drupal/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-drupal/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
slug
}
>
<
a
className
=
"hover:underline"
dangerouslySetInnerHTML
=
{{
__html
:
title
}}
/
>
<
/Link
>
<
Link
href
=
{
slug
}
className
=
"hover:underline"
dangerouslySetInnerHTML
=
{{
__html
:
title
}}
><
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
<
Date
dateString
=
{
date
}
/
>
...
...
examples/cms-drupal/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,12 +17,11 @@ export default function PostPreview({
<
CoverImage
title
=
{
title
}
coverImage
=
{
coverImage
}
slug
=
{
slug
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
slug
}
>
<
a
className
=
"hover:underline"
dangerouslySetInnerHTML
=
{{
__html
:
title
}}
><
/a
>
<
/Link
>
<
Link
href
=
{
slug
}
className
=
"hover:underline"
dangerouslySetInnerHTML
=
{{
__html
:
title
}}
><
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
<
Date
dateString
=
{
date
}
/
>
...
...
examples/cms-enterspeed/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
href=
{
`/posts${slug}`
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts${slug}`
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-enterspeed/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-enterspeed/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href=
{
`/posts${slug}`
}
>
<
a
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
/>
</
Link
>
<
Link
href=
{
`/posts${slug}`
}
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
></
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
<
Date
dateString=
{
date
}
/>
...
...
examples/cms-enterspeed/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -29,8 +29,8 @@ export default function PostPreview({
)
}
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
href=
{
`/posts${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/cms-ghost/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug, width, height }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-ghost/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-ghost/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-ghost/components/post-preview.js
View file @
ab42da06
...
...
@@ -23,8 +23,8 @@ export default function PostPreview({
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-graphcms/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-graphcms/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-graphcms/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-graphcms/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
url
=
{
coverImage
.
url
}
/
>
<
/div
>
<
h3
className
=
"mb-3 text-3xl leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg"
>
...
...
examples/cms-keystonejs-embedded/pages/index.tsx
View file @
ab42da06
...
...
@@ -27,27 +27,26 @@ export default function Home({ posts }) {
posts
.
map
((
post
)
=>
(
<
li
key=
{
post
.
id
}
className=
{
styles
.
card
}
>
<
Link
href=
{
`/post/${post.slug}`
}
>
<
a
>
<
h2
>
{
post
.
title
}
</
h2
>
<
p
>
Read now
→
</
p
>
</
a
>
<
h2
>
{
post
.
title
}
</
h2
>
<
p
>
Read now
→
</
p
>
</
Link
>
</
li
>
))
)
:
(
<
li
className=
{
`${styles.noposts} ${styles.card}`
}
>
<
Link
href=
"http://localhost:8000"
>
<
a
>
<
h2
>
No Posts
</
h2
>
<
p
>
Add one via the Admin UI
→
</
p
>
</
a
>
<
h2
>
No Posts
</
h2
>
<
p
>
Add one via the Admin UI
→
</
p
>
</
Link
>
</
li
>
)
}
</
ul
>
{
process
.
env
.
NODE_ENV
!==
'production'
&&
(
<
Link
href=
"/api/graphql?query=%7BallPosts%7Btitle%2Cslug%2Ccontent%7D%7D"
>
<
a
className=
{
styles
.
playground
}
>
Visit the graphql playground
</
a
>
<
Link
href=
"/api/graphql?query=%7BallPosts%7Btitle%2Cslug%2Ccontent%7D%7D"
className=
{
styles
.
playground
}
>
Visit the graphql playground
</
Link
>
)
}
</
main
>
...
...
examples/cms-keystonejs-embedded/pages/post/[slug].tsx
View file @
ab42da06
...
...
@@ -6,9 +6,7 @@ export default function Home({ post }) {
<
div
>
<
main
style=
{
{
margin
:
'3rem'
}
}
>
<
div
>
<
Link
href=
"/"
>
<
a
>
←
back home
</
a
>
</
Link
>
<
Link
href=
"/"
>
←
back home
</
Link
>
</
div
>
<
h1
>
{
post
.
title
}
</
h1
>
<
p
>
{
post
.
content
}
</
p
>
...
...
examples/cms-kontent/components/cover-image.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function CoverImage({ title, src, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-kontent/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-kontent/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-kontent/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
src
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-prepr/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-prepr/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-prepr/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-prepr/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
url
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"mb-3 text-3xl leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg"
>
...
...
examples/cms-prismic/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -29,8 +29,8 @@ export default function CoverImage({
return
(
<
div
className=
"sm:mx-0"
>
{
href
?
(
<
Link
href=
{
href
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
href
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-prismic/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-prismic/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href=
{
href
}
>
<
a
className=
"hover:underline"
>
<
PrismicText
field=
{
title
}
/>
</
a
>
<
Link
href=
{
href
}
className=
"hover:underline"
>
<
PrismicText
field=
{
title
}
/>
</
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-prismic/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -33,10 +33,8 @@ export default function PostPreview({
<
CoverImage
title=
{
asText
(
title
)
}
href=
{
href
}
image=
{
coverImage
}
/>
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
href=
{
href
}
>
<
a
className=
"hover:underline"
>
<
PrismicText
field=
{
title
}
/>
</
a
>
<
Link
href=
{
href
}
className=
"hover:underline"
>
<
PrismicText
field=
{
title
}
/>
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/cms-sanity/components/cover-image.js
View file @
ab42da06
...
...
@@ -28,8 +28,8 @@ export default function CoverImage({ title, slug, image: source, priority }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-sanity/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-sanity/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-sanity/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
image
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"mb-3 text-3xl leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg"
>
...
...
examples/cms-sitefinity/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -20,8 +20,8 @@ const CoverImage = ({ title, src, slug }: Props) => {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-sitefinity/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
const
Header
=
()
=>
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-sitefinity/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-5xl leading-tight"
>
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-sitefinity/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -27,8 +27,12 @@ const PostPreview = ({
<
CoverImage
slug=
{
slug
}
title=
{
title
}
src=
{
coverImage
}
/>
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
as=
{
`/posts${slug}`
}
href=
"/posts[slug]"
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
...
...
examples/cms-storyblok/components/cover-image.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
slug
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
slug
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-storyblok/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-storyblok/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-storyblok/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
url
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-strapi/components/cover-image.js
View file @
ab42da06
...
...
@@ -21,8 +21,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-strapi/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-strapi/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-strapi/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
url
=
{
coverImage
.
url
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-takeshape/components/cover-image.js
View file @
ab42da06
...
...
@@ -23,8 +23,8 @@ export default function CoverImage({ title, coverImage, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
slug
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
slug
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-takeshape/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-takeshape/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-takeshape/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
coverImage
=
{
coverImage
}
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-tina/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, src, slug, height, width }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-tina/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-tina/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 md:mb-0 text-lg"
>
...
...
examples/cms-tina/components/post-preview.js
View file @
ab42da06
...
...
@@ -23,8 +23,8 @@ export default function PostPreview({
/
>
<
/div
>
<
h3
className
=
"text-3xl mb-3 leading-snug"
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"text-lg mb-4"
>
...
...
examples/cms-umbraco-heartcore/components/cover-image.js
View file @
ab42da06
...
...
@@ -18,8 +18,8 @@ export default function CoverImage({ title, url, slug }) {
return
(
<
div
className
=
"sm:mx-0"
>
{
slug
?
(
<
Link
href
=
{
slug
}
>
<
a
aria
-
label
=
{
title
}
>
{
image
}
<
/a
>
<
Link
href
=
{
slug
}
aria
-
label
=
{
title
}
>
{
image
}
<
/Link
>
)
:
(
image
...
...
examples/cms-umbraco-heartcore/components/header.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className
=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href
=
"/"
>
<
a
className
=
"hover:underline"
>
Blog
<
/a
>
<
Link
href
=
"/"
className
=
"hover:underline"
>
Blog
<
/Link
>
.
<
/h2
>
...
...
examples/cms-umbraco-heartcore/components/hero-post.js
View file @
ab42da06
...
...
@@ -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
>
<
h3
className
=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
href
=
{
slug
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
slug
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-umbraco-heartcore/components/post-preview.js
View file @
ab42da06
...
...
@@ -17,8 +17,8 @@ export default function PostPreview({
<
CoverImage
slug
=
{
slug
}
title
=
{
title
}
url
=
{
coverImage
.
url
}
/
>
<
/div
>
<
h3
className
=
"mb-3 text-3xl leading-snug"
>
<
Link
href
=
{
slug
}
>
<
a
className
=
"hover:underline"
>
{
title
}
<
/a
>
<
Link
href
=
{
slug
}
className
=
"hover:underline"
>
{
title
}
<
/Link
>
<
/h3
>
<
div
className
=
"mb-4 text-lg"
>
...
...
examples/cms-webiny/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -32,8 +32,8 @@ const CoverImage: React.FC<TCoverImage> = ({
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-webiny/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"mt-8 mb-20 text-2xl font-bold leading-tight tracking-tight md:text-4xl md:tracking-tighter"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-webiny/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl leading-tight lg:text-6xl"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 text-lg md:mb-0"
>
...
...
examples/cms-webiny/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -23,8 +23,8 @@ export default function PostPreview({
/>
</
div
>
<
h3
className=
"mb-3 text-3xl leading-snug"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
>
{
title
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
>
{
title
}
</
Link
>
</
h3
>
<
div
className=
"mb-4 text-lg"
>
...
...
examples/cms-wordpress/components/cover-image.tsx
View file @
ab42da06
...
...
@@ -27,8 +27,8 @@ export default function CoverImage({ title, coverImage, slug }: Props) {
return
(
<
div
className=
"sm:mx-0"
>
{
slug
?
(
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
aria
-
label=
{
title
}
>
{
image
}
</
a
>
<
Link
href=
{
`/posts/${slug}`
}
aria
-
label=
{
title
}
>
{
image
}
</
Link
>
)
:
(
image
...
...
examples/cms-wordpress/components/header.tsx
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
h2
className=
"text-2xl md:text-4xl font-bold tracking-tight md:tracking-tighter leading-tight mb-20 mt-8"
>
<
Link
href=
"/"
>
<
a
className=
"hover:underline"
>
Blog
</
a
>
<
Link
href=
"/"
className=
"hover:underline"
>
Blog
</
Link
>
.
</
h2
>
...
...
examples/cms-wordpress/components/hero-post.tsx
View file @
ab42da06
...
...
@@ -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
>
<
h3
className=
"mb-4 text-4xl lg:text-6xl leading-tight"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
/>
</
Link
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
></
Link
>
</
h3
>
<
div
className=
"mb-4 md:mb-0 text-lg"
>
<
Date
dateString=
{
date
}
/>
...
...
examples/cms-wordpress/components/post-preview.tsx
View file @
ab42da06
...
...
@@ -19,12 +19,11 @@ export default function PostPreview({
)
}
</
div
>
<
h3
className=
"text-3xl mb-3 leading-snug"
>
<
Link
href=
{
`/posts/${slug}`
}
>
<
a
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
></
a
>
</
Link
>
<
Link
href=
{
`/posts/${slug}`
}
className=
"hover:underline"
dangerouslySetInnerHTML=
{
{
__html
:
title
}
}
></
Link
>
</
h3
>
<
div
className=
"text-lg mb-4"
>
<
Date
dateString=
{
date
}
/>
...
...
examples/custom-server-actionhero/pages/index.js
View file @
ab42da06
...
...
@@ -5,12 +5,12 @@ export default function Home() {
<
ul
>
<
li
>
<
Link
href
=
"/b"
as
=
"/a"
>
<
a
>
a
<
/a
>
a
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/a"
as
=
"/b"
>
<
a
>
b
<
/a
>
b
<
/Link
>
<
/li
>
<
/ul
>
...
...
examples/custom-server-express/pages/index.js
View file @
ab42da06
...
...
@@ -5,12 +5,12 @@ export default function Home() {
<
ul
>
<
li
>
<
Link
href
=
"/b"
as
=
"/a"
>
<
a
>
a
<
/a
>
a
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/a"
as
=
"/b"
>
<
a
>
b
<
/a
>
b
<
/Link
>
<
/li
>
<
/ul
>
...
...
examples/custom-server-fastify/pages/index.js
View file @
ab42da06
...
...
@@ -5,12 +5,12 @@ export default function Home() {
<
ul
>
<
li
>
<
Link
href
=
"/b"
as
=
"/a"
>
<
a
>
a
<
/a
>
a
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/a"
as
=
"/b"
>
<
a
>
b
<
/a
>
b
<
/Link
>
<
/li
>
<
/ul
>
...
...
examples/custom-server-hapi/pages/index.tsx
View file @
ab42da06
...
...
@@ -6,12 +6,12 @@ export default function Home() {
<
ul
>
<
li
>
<
Link
href=
"/b"
as=
"/a"
>
<
a
>
a
</
a
>
a
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/a"
as=
"/b"
>
<
a
>
b
</
a
>
b
</
Link
>
</
li
>
</
ul
>
...
...
examples/custom-server-koa/pages/index.js
View file @
ab42da06
...
...
@@ -4,14 +4,10 @@ export default function Home() {
return
(
<
ul
>
<
li
>
<
Link
href
=
"/a"
>
<
a
>
a
<
/a
>
<
/Link
>
<
Link
href
=
"/a"
>
a
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/b"
>
<
a
>
b
<
/a
>
<
/Link
>
<
Link
href
=
"/b"
>
b
<
/Link
>
<
/li
>
<
/ul
>
)
...
...
examples/custom-server-polka/pages/index.js
View file @
ab42da06
...
...
@@ -5,12 +5,12 @@ export default function Home() {
<
ul
>
<
li
>
<
Link
href
=
"/b"
as
=
"/a"
>
<
a
>
a
<
/a
>
a
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/a"
as
=
"/b"
>
<
a
>
b
<
/a
>
b
<
/Link
>
<
/li
>
<
/ul
>
...
...
examples/data-fetch/pages/index.tsx
View file @
ab42da06
...
...
@@ -18,9 +18,7 @@ export default function IndexPage({
return
(
<>
<
p
>
Next.js has
{
stars
}
⭐️
</
p
>
<
Link
href=
"/preact-stars"
>
<
a
>
How about preact?
</
a
>
</
Link
>
<
Link
href=
"/preact-stars"
>
How about preact?
</
Link
>
</>
)
}
examples/data-fetch/pages/preact-stars.tsx
View file @
ab42da06
...
...
@@ -18,9 +18,7 @@ export default function PreactStarsPage({
return
(
<>
<
p
>
Preact has
{
stars
}
⭐
</
p
>
<
Link
href=
"/"
>
<
a
>
I bet Next.js has more stars (?)
</
a
>
</
Link
>
<
Link
href=
"/"
>
I bet Next.js has more stars (?)
</
Link
>
</>
)
}
examples/dynamic-routing/components/header.tsx
View file @
ab42da06
...
...
@@ -5,24 +5,16 @@ export default function Header() {
<
header
>
<
ul
>
<
li
>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Home
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/post/first"
>
<
a
>
First Post
</
a
>
</
Link
>
<
Link
href=
"/post/first"
>
First Post
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/post/second"
>
<
a
>
Second Post
</
a
>
</
Link
>
<
Link
href=
"/post/second"
>
Second Post
</
Link
>
</
li
>
</
ul
>
</
header
>
...
...
examples/dynamic-routing/pages/post/[id]/index.tsx
View file @
ab42da06
...
...
@@ -12,14 +12,10 @@ export default function PostPage() {
<
h1
>
Post:
{
id
}
</
h1
>
<
ul
>
<
li
>
<
Link
href=
{
`/post/${id}/first-comment`
}
>
<
a
>
First comment
</
a
>
</
Link
>
<
Link
href=
{
`/post/${id}/first-comment`
}
>
First comment
</
Link
>
</
li
>
<
li
>
<
Link
href=
{
`/post/${id}/second-comment`
}
>
<
a
>
Second comment
</
a
>
</
Link
>
<
Link
href=
{
`/post/${id}/second-comment`
}
>
Second comment
</
Link
>
</
li
>
</
ul
>
</>
...
...
examples/headers/pages/index.tsx
View file @
ab42da06
...
...
@@ -10,7 +10,10 @@ export default function Index() {
<
hr
className=
{
styles
.
hr
}
/>
<
p
>
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
>
</>
...
...
examples/hello-world/pages/index.tsx
View file @
ab42da06
...
...
@@ -3,10 +3,7 @@ import Link from 'next/link'
export
default
function
IndexPage
()
{
return
(
<
div
>
Hello World.
{
' '
}
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
Hello World.
<
Link
href=
"/about"
>
About
</
Link
>
</
div
>
)
}
examples/i18n-routing/components/locale-switcher.tsx
View file @
ab42da06
...
...
@@ -17,7 +17,12 @@ export default function LocaleSwitcher() {
const
{
pathname
,
query
,
asPath
}
=
router
return
(
<
li
key=
{
locale
}
>
<
Link
href=
{
{
pathname
,
query
}
}
as=
{
asPath
}
locale=
{
locale
}
>
<
Link
href=
{
{
pathname
,
query
}
}
as=
{
asPath
}
locale=
{
locale
}
legacyBehavior
>
{
locale
}
</
Link
>
</
li
>
...
...
examples/image-component/pages/index.tsx
View file @
ab42da06
...
...
@@ -36,34 +36,22 @@ const Index = () => (
</
p
>
<
ul
>
<
li
>
<
Link
href=
"/responsive"
>
<
a
>
Responsive to viewport
</
a
>
</
Link
>
<
Link
href=
"/responsive"
>
Responsive to viewport
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/fill"
>
<
a
>
Fill dimensions of parent element
</
a
>
</
Link
>
<
Link
href=
"/fill"
>
Fill dimensions of parent element
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/placeholder"
>
<
a
>
Blur-up placeholder
</
a
>
</
Link
>
<
Link
href=
"/placeholder"
>
Blur-up placeholder
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/shimmer"
>
<
a
>
Shimmer placeholder
</
a
>
</
Link
>
<
Link
href=
"/shimmer"
>
Shimmer placeholder
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/color"
>
<
a
>
Color placeholder
</
a
>
</
Link
>
<
Link
href=
"/color"
>
Color placeholder
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/background"
>
<
a
>
Text on background image
</
a
>
</
Link
>
<
Link
href=
"/background"
>
Text on background image
</
Link
>
</
li
>
</
ul
>
<
hr
className=
{
styles
.
hr
}
/>
...
...
examples/image-legacy-component/pages/index.tsx
View file @
ab42da06
...
...
@@ -40,29 +40,19 @@ const Index = () => (
</
p
>
<
ul
>
<
li
>
<
Link
href=
"/layout-intrinsic"
>
<
a
>
layout="intrinsic"
</
a
>
</
Link
>
<
Link
href=
"/layout-intrinsic"
>
layout="intrinsic"
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/layout-responsive"
>
<
a
>
layout="responsive"
</
a
>
</
Link
>
<
Link
href=
"/layout-responsive"
>
layout="responsive"
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/layout-fixed"
>
<
a
>
layout="fixed"
</
a
>
</
Link
>
<
Link
href=
"/layout-fixed"
>
layout="fixed"
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/layout-fill"
>
<
a
>
layout="fill"
</
a
>
</
Link
>
<
Link
href=
"/layout-fill"
>
layout="fill"
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/background"
>
<
a
>
background demo
</
a
>
</
Link
>
<
Link
href=
"/background"
>
background demo
</
Link
>
</
li
>
</
ul
>
<
hr
className=
{
styles
.
hr
}
/>
...
...
@@ -81,18 +71,16 @@ const Index = () => (
</
p
>
<
ul
>
<
li
>
<
Link
href=
"/placeholder"
>
<
a
>
placeholder="blur"
</
a
>
</
Link
>
<
Link
href=
"/placeholder"
>
placeholder="blur"
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/shimmer"
>
<
a
>
placeholder="blur" with animated shimmer blurDataURL
</
a
>
placeholder="blur" with animated shimmer blurDataURL
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/color"
>
<
a
>
placeholder="blur" with solid color blurDataURL
</
a
>
placeholder="blur" with solid color blurDataURL
</
Link
>
</
li
>
</
ul
>
...
...
examples/layout-component/components/sidebar.tsx
View file @
ab42da06
...
...
@@ -5,15 +5,9 @@ export default function Sidebar() {
return
(
<
nav
className=
{
styles
.
nav
}
>
<
input
className=
{
styles
.
input
}
placeholder=
"Search..."
/>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/contact"
>
<
a
>
Contact
</
a
>
</
Link
>
<
Link
href=
"/"
>
Home
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
<
Link
href=
"/contact"
>
Contact
</
Link
>
</
nav
>
)
}
examples/middleware/pages/index.tsx
View file @
ab42da06
...
...
@@ -7,17 +7,17 @@ const Home: NextPage = () => {
<
h1
>
Index
</
h1
>
<
p
>
<
Link
href=
"/about"
passHref
>
<
a
>
Go to about page (will redirect)
</
a
>
Go to about page (will redirect)
</
Link
>
</
p
>
<
p
>
<
Link
href=
"/another"
passHref
>
<
a
>
Go to another page (will rewrite)
</
a
>
Go to another page (will rewrite)
</
Link
>
</
p
>
<
p
>
<
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
>
</
p
>
</
div
>
...
...
examples/next-forms/pages/index.tsx
View file @
ab42da06
...
...
@@ -24,18 +24,14 @@ export default function IndexPage() {
</
p
>
<
div
className=
{
styles
.
grid
}
>
<
Link
href=
"/js-form"
>
<
a
className=
{
styles
.
card
}
>
<
h2
>
Form with JavaScript
→
</
h2
>
<
p
>
Learn to handle forms with JavaScript in Next.js.
</
p
>
</
a
>
<
Link
href=
"/js-form"
className=
{
styles
.
card
}
>
<
h2
>
Form with JavaScript
→
</
h2
>
<
p
>
Learn to handle forms with JavaScript in Next.js.
</
p
>
</
Link
>
<
Link
href=
"/no-js-form"
>
<
a
className=
{
styles
.
card
}
>
<
h2
>
Form without JavaScript
→
</
h2
>
<
p
>
Learn to handle forms without JavaScript in Next.js.
</
p
>
</
a
>
<
Link
href=
"/no-js-form"
className=
{
styles
.
card
}
>
<
h2
>
Form without JavaScript
→
</
h2
>
<
p
>
Learn to handle forms without JavaScript in Next.js.
</
p
>
</
Link
>
</
div
>
</
main
>
...
...
examples/next-forms/pages/js-form.tsx
View file @
ab42da06
...
...
@@ -37,11 +37,7 @@ export default function PageWithJSbasedForm() {
return
(
<
div
className=
"container"
>
<
h1
className=
{
styles
.
title
}
>
Form
{
' '
}
<
Link
href=
"/"
>
<
a
>
with
</
a
>
</
Link
>
{
' '
}
JavaScript.
Form
<
Link
href=
"/"
>
with
</
Link
>
JavaScript.
</
h1
>
<
p
className=
{
styles
.
description
}
>
...
...
examples/next-forms/pages/no-js-form.tsx
View file @
ab42da06
...
...
@@ -5,11 +5,7 @@ export default function Form() {
return
(
<
div
className=
"container"
>
<
h1
className=
{
styles
.
title
}
>
Form
{
' '
}
<
Link
href=
"/"
>
<
a
>
without
</
a
>
</
Link
>
{
' '
}
JavaScript.
Form
<
Link
href=
"/"
>
without
</
Link
>
JavaScript.
</
h1
>
<
p
className=
{
styles
.
description
}
>
Get started by looking at
{
' '
}
...
...
examples/redirects/pages/index.tsx
View file @
ab42da06
...
...
@@ -10,7 +10,10 @@ export default function Index() {
<
hr
className=
{
styles
.
hr
}
/>
<
p
>
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
>
</>
...
...
examples/rewrites/pages/index.tsx
View file @
ab42da06
...
...
@@ -10,7 +10,10 @@ export default function Index() {
<
hr
className=
{
styles
.
hr
}
/>
<
p
>
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
>
</>
...
...
examples/using-preact/pages/index.tsx
View file @
ab42da06
...
...
@@ -6,19 +6,13 @@ export default function IndexPage() {
Hello World.
{
' '
}
<
ul
>
<
li
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/ssr"
>
<
a
>
SSR
</
a
>
</
Link
>
<
Link
href=
"/ssr"
>
SSR
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/ssg"
>
<
a
>
SSG
</
a
>
</
Link
>
<
Link
href=
"/ssg"
>
SSG
</
Link
>
</
li
>
</
ul
>
</
div
>
...
...
examples/with-ant-design/pages/index.tsx
View file @
ab42da06
...
...
@@ -29,10 +29,8 @@ export default function Home() {
return
(
<
div
style=
{
content
}
>
<
div
className=
"text-center mb-5"
>
<
Link
href=
"#"
>
<
a
className=
"logo mr-0"
>
<
SmileFilled
style=
{
{
fontSize
:
48
}
}
/>
</
a
>
<
Link
href=
"#"
className=
"logo mr-0"
>
<
SmileFilled
style=
{
{
fontSize
:
48
}
}
/>
</
Link
>
<
p
className=
"mb-0 mt-3 text-disabled"
>
Welcome to the world !
</
p
>
...
...
examples/with-apollo-and-redux/components/Nav.js
View file @
ab42da06
...
...
@@ -6,13 +6,13 @@ export default function Nav() {
return
(
<
header
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/'
?
'is-active'
:
''
}
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/apollo"
>
<
Link
href
=
"/apollo"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/apollo'
?
'is-active'
:
''
}
>
Apollo
<
/a
>
<
/Link
>
<
Link
href
=
"/redux"
>
<
Link
href
=
"/redux"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/redux'
?
'is-active'
:
''
}
>
Redux
<
/a
>
<
/Link
>
<
style
jsx
>
{
`
...
...
examples/with-apollo-neo4j-graphql/pages/actor/[name].js
View file @
ab42da06
...
...
@@ -54,6 +54,7 @@ export default function Actor() {
as
=
{{
pathname
:
`/movie/
${
encodeURIComponent
(
movie
.
title
)}
`
,
}}
legacyBehavior
>
<
a
>
{
movie
.
title
}
<
/a
>
<
/Link
>
...
...
@@ -63,7 +64,7 @@ export default function Actor() {
<
/div
>
<
div
className
=
"back"
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
🔙
Go
Back
<
/a
>
<
/Link
>
<
/div
>
...
...
examples/with-apollo-neo4j-graphql/pages/index.js
View file @
ab42da06
...
...
@@ -62,6 +62,7 @@ export default function Home() {
as
=
{{
pathname
:
`/movie/
${
encodeURIComponent
(
movie
.
title
)}
`
,
}}
legacyBehavior
>
<
a
className
=
"link"
>
{
movie
.
title
}
<
/a
>
<
/Link
>
...
...
@@ -86,6 +87,7 @@ export default function Home() {
actor
.
name
)}
`
,
}}
legacyBehavior
>
<
a
className
=
"link"
>
{
actor
.
name
}
<
/a
>
<
/Link
>
...
...
examples/with-apollo-neo4j-graphql/pages/movie/[title].js
View file @
ab42da06
...
...
@@ -68,7 +68,7 @@ export default function Movie() {
<
/div
>
<
div
className
=
"back"
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
🔙
Go
Back
<
/a
>
<
/Link
>
<
/div
>
...
...
examples/with-apollo/components/Header.js
View file @
ab42da06
...
...
@@ -6,18 +6,18 @@ export default function Header() {
return
(
<
header
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/'
?
'is-active'
:
''
}
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
<
Link
href
=
"/about"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/about'
?
'is-active'
:
''
}
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/client-only"
>
<
Link
href
=
"/client-only"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/client-only'
?
'is-active'
:
''
}
>
Client
-
Only
<
/a
>
<
/Link
>
<
Link
href
=
"/ssr"
>
<
Link
href
=
"/ssr"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/ssr'
?
'is-active'
:
''
}
>
SSR
<
/a
>
<
/Link
>
<
style
jsx
>
{
`
...
...
examples/with-cerebral/components/Page.js
View file @
ab42da06
...
...
@@ -25,9 +25,7 @@ export default connect(
<
h1
>
{
this
.
props
.
title
}
<
/h1
>
<
Clock
lastUpdate
=
{
this
.
props
.
lastUpdate
}
light
=
{
this
.
props
.
light
}
/
>
<
nav
>
<
Link
href
=
{
this
.
props
.
linkTo
}
>
<
a
>
Navigate
<
/a
>
<
/Link
>
<
Link
href
=
{
this
.
props
.
linkTo
}
>
Navigate
<
/Link
>
<
/nav
>
<
/div
>
)
...
...
examples/with-clerk/components/Header.js
View file @
ab42da06
...
...
@@ -12,11 +12,9 @@ import { SignedIn, SignedOut, UserButton } from '@clerk/nextjs'
const
Header
=
()
=>
(
<
header
className
=
{
styles
.
header
}
>
<
div
className
=
{
styles
.
left
}
>
<
Link
href
=
"/"
>
<
a
className
=
{
styles
.
logo
}
>
<
Image
src
=
"/logo.svg"
width
=
"32"
height
=
"32"
alt
=
"Logo"
/>
<
span
className
=
{
styles
.
appName
}
>
Your
application
<
/span
>
<
/a
>
<
Link
href
=
"/"
className
=
{
styles
.
logo
}
>
<
Image
src
=
"/logo.svg"
width
=
"32"
height
=
"32"
alt
=
"Logo"
/>
<
span
className
=
{
styles
.
appName
}
>
Your
application
<
/span
>
<
/Link
>
<
/div
>
<
div
className
=
{
styles
.
right
}
>
...
...
examples/with-clerk/pages/_app.js
View file @
ab42da06
...
...
@@ -44,11 +44,8 @@ const MyApp = ({ Component, pageProps }) => {
<
SignedOut
>
<
main
>
<
p
>
Please
{
' '
}
<
Link
href
=
"/sign-in"
>
<
a
>
sign
in
<
/a
>
<
/Link>{' '
}
to
access
this
page
.
Please
<
Link
href
=
"/sign-in"
>
sign
in
<
/Link> to access thi
s
page
.
<
/p
>
<
/main
>
<
/SignedOut
>
...
...
examples/with-clerk/pages/index.js
View file @
ab42da06
...
...
@@ -5,38 +5,34 @@ import styles from '../styles/Home.module.css'
import
{
SignedIn
,
SignedOut
}
from
'@clerk/nextjs'
const
ClerkFeatures
=
()
=>
(
<
Link
href
=
"/user"
>
<
a
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/layout.svg"
/>
<
div
>
<
h3
>
Explore
features
provided
by
Clerk
<
/h3
>
<
p
>
Interact
with
the
user
button
,
user
profile
,
and
more
to
preview
what
your
users
will
see
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/a
>
<
Link
href
=
"/user"
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/layout.svg"
/>
<
div
>
<
h3
>
Explore
features
provided
by
Clerk
<
/h3
>
<
p
>
Interact
with
the
user
button
,
user
profile
,
and
more
to
preview
what
your
users
will
see
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/Link
>
)
const
SignupLink
=
()
=>
(
<
Link
href
=
"/sign-up"
>
<
a
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/user-plus.svg"
/>
<
div
>
<
h3
>
Sign
up
for
an
account
<
/h3
>
<
p
>
Sign
up
and
sign
in
to
explore
all
the
features
provided
by
Clerk
out
-
of
-
the
-
box
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/a
>
<
Link
href
=
"/sign-up"
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/user-plus.svg"
/>
<
div
>
<
h3
>
Sign
up
for
an
account
<
/h3
>
<
p
>
Sign
up
and
sign
in
to
explore
all
the
features
provided
by
Clerk
out
-
of
-
the
-
box
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/Link
>
)
...
...
@@ -72,20 +68,23 @@ const Main = () => (
<
/div
>
<
div
className
=
{
styles
.
card
}
>
<
Link
href
=
"https://dashboard.clerk.dev"
>
<
a
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/settings.svg"
/>
<
div
>
<
h3
>
Configure
settings
for
your
app
<
/h3
>
<
p
>
Visit
Clerk
to
manage
instances
and
configure
settings
for
user
management
,
theme
,
and
more
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/a
>
<
Link
href
=
"https://dashboard.clerk.dev"
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
cardContent
}
>
<
img
src
=
"/icons/settings.svg"
/>
<
div
>
<
h3
>
Configure
settings
for
your
app
<
/h3
>
<
p
>
Visit
Clerk
to
manage
instances
and
configure
settings
for
user
management
,
theme
,
and
more
<
/p
>
<
/div
>
<
div
className
=
{
styles
.
arrow
}
>
<
img
src
=
"/icons/arrow-right.svg"
/>
<
/div
>
<
/Link
>
<
/div
>
<
/div
>
...
...
@@ -93,15 +92,21 @@ const Main = () => (
<
APIRequest
/>
<
div
className
=
{
styles
.
links
}
>
<
Link
href
=
"https://docs.clerk.dev"
>
<
a
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
link
}
>
<
span
className
=
{
styles
.
linkText
}
>
Read
Clerk
documentation
<
/span
>
<
/a
>
<
Link
href
=
"https://docs.clerk.dev"
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
link
}
>
<
span
className
=
{
styles
.
linkText
}
>
Read
Clerk
documentation
<
/span
>
<
/Link
>
<
Link
href
=
"https://nextjs.org/docs"
>
<
a
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
link
}
>
<
span
className
=
{
styles
.
linkText
}
>
Read
NextJS
documentation
<
/span
>
<
/a
>
<
Link
href
=
"https://nextjs.org/docs"
target
=
"_blank"
rel
=
"noreferrer"
className
=
{
styles
.
link
}
>
<
span
className
=
{
styles
.
linkText
}
>
Read
NextJS
documentation
<
/span
>
<
/Link
>
<
/div
>
<
/main
>
...
...
examples/with-contentlayer/pages/index.js
View file @
ab42da06
...
...
@@ -16,9 +16,7 @@ export default function Home({ posts }) {
<
ul
className
=
{
utilStyles
.
list
}
>
{
posts
.
map
(({
slug
,
date
,
title
})
=>
(
<
li
className
=
{
utilStyles
.
listItem
}
key
=
{
slug
}
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
<
a
>
{
title
}
<
/a
>
<
/Link
>
<
Link
href
=
{
`/posts/
${
slug
}
`
}
>
{
title
}
<
/Link
>
<
br
/>
<
small
className
=
{
utilStyles
.
lightText
}
>
{
date
}
<
/small
>
<
/li
>
...
...
examples/with-context-api/pages/about.tsx
View file @
ab42da06
...
...
@@ -23,9 +23,7 @@ const AboutPage = () => {
<
button
onClick=
{
handleIncrease
}
>
Increase
</
button
>
<
button
onClick=
{
handleIncrease15
}
>
Increase By 15
</
button
>
<
p
>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Home
</
Link
>
</
p
>
</>
)
...
...
examples/with-context-api/pages/index.tsx
View file @
ab42da06
...
...
@@ -22,9 +22,7 @@ const IndexPage = () => {
<
button
onClick=
{
handleIncrease
}
>
Increase
</
button
>
<
button
onClick=
{
handleDecrease
}
>
Decrease
</
button
>
<
p
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
p
>
</>
)
...
...
examples/with-cookie-auth-fauna/components/header.js
View file @
ab42da06
...
...
@@ -6,22 +6,22 @@ const Header = (props) => (
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
Home
<
/a
>
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/login"
>
<
Link
href
=
"/login"
legacyBehavior
>
<
a
>
Login
<
/a
>
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/signup"
>
<
Link
href
=
"/signup"
legacyBehavior
>
<
a
>
Signup
<
/a
>
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/profile"
>
<
Link
href
=
"/profile"
legacyBehavior
>
<
a
>
Profile
<
/a
>
<
/Link
>
<
/li
>
...
...
examples/with-cypress/pages/about.tsx
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ export default function About() {
<
main
className=
{
styles
.
main
}
>
<
h1
>
About Page
</
h1
>
<
p
className=
{
styles
.
description
}
>
<
Link
href=
"/"
>
<
a
>
←
Go Back
</
a
>
</
Link
>
<
Link
href=
"/"
>
←
Go Back
</
Link
>
</
p
>
</
main
>
</
div
>
...
...
examples/with-cypress/pages/index.tsx
View file @
ab42da06
...
...
@@ -23,11 +23,9 @@ export default function Home() {
</
p
>
<
div
className=
{
styles
.
grid
}
>
<
Link
href=
"/about"
>
<
a
className=
{
styles
.
card
}
>
<
h2
>
About Page
→
</
h2
>
<
p
>
Cypress will test if this link is working.
</
p
>
</
a
>
<
Link
href=
"/about"
className=
{
styles
.
card
}
>
<
h2
>
About Page
→
</
h2
>
<
p
>
Cypress will test if this link is working.
</
p
>
</
Link
>
<
a
href=
"https://nextjs.org/docs"
className=
{
styles
.
card
}
>
...
...
examples/with-dynamic-import/components/Header.tsx
View file @
ab42da06
...
...
@@ -3,12 +3,12 @@ import Link from 'next/link'
export
default
function
Header
()
{
return
(
<
div
>
<
Link
href=
"/"
>
<
a
style=
{
{
marginRight
:
10
}
}
>
Home
</
a
>
<
Link
href=
"/"
style=
{
{
marginRight
:
10
}
}
>
Home
</
Link
>
<
Link
href=
"/about"
>
<
a
style=
{
{
marginRight
:
10
}
}
>
About
</
a
>
<
Link
href=
"/about"
style=
{
{
marginRight
:
10
}
}
>
About
</
Link
>
</
div
>
)
...
...
examples/with-edgedb/components/Header.tsx
View file @
ab42da06
...
...
@@ -5,15 +5,15 @@ const Header: React.FC = () => {
return
(
<
nav
>
<
div
className=
"left"
>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
>
Blog
</
a
>
</
Link
>
<
Link
href=
"/drafts"
>
<
Link
href=
"/drafts"
legacyBehavior
>
<
a
>
Drafts
</
a
>
</
Link
>
</
div
>
<
div
className=
"right"
>
<
Link
href=
"/create"
>
<
Link
href=
"/create"
legacyBehavior
>
<
a
>
+ New draft
</
a
>
</
Link
>
</
div
>
...
...
examples/with-edgedb/components/Post.tsx
View file @
ab42da06
...
...
@@ -5,7 +5,7 @@ import { PostProps } from '../pages/blog/[id]'
const
Post
:
React
.
FC
<
{
post
:
PostProps
}
>
=
({
post
})
=>
{
return
(
<
Link
href=
{
`/blog/${post.id}`
}
passHref
>
<
Link
href=
{
`/blog/${post.id}`
}
passHref
legacyBehavior
>
<
div
>
<
h2
>
{
post
.
title
}
</
h2
>
<
small
>
By
{
post
.
authorName
}
</
small
>
...
...
examples/with-edgedb/pages/create.tsx
View file @
ab42da06
...
...
@@ -54,7 +54,7 @@ const Draft: React.FC = () => {
type=
"submit"
value=
"Create"
/>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
className=
"back"
>
Cancel
</
a
>
</
Link
>
</
form
>
...
...
examples/with-electron-typescript/renderer/components/Layout.tsx
View file @
ab42da06
...
...
@@ -16,17 +16,8 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</
Head
>
<
header
>
<
nav
>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
{
' '
}
|
{
' '
}
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
{
' '
}
|
{
' '
}
<
Link
href=
"/initial-props"
>
<
a
>
With Initial Props
</
a
>
</
Link
>
<
Link
href=
"/"
>
Home
</
Link
>
|
<
Link
href=
"/about"
>
About
</
Link
>
|
{
' '
}
<
Link
href=
"/initial-props"
>
With Initial Props
</
Link
>
</
nav
>
</
header
>
{
children
}
...
...
examples/with-electron-typescript/renderer/components/ListItem.tsx
View file @
ab42da06
...
...
@@ -9,9 +9,7 @@ type Props = {
const
ListItem
=
({
data
}:
Props
)
=>
(
<
Link
href=
"/detail/[id]"
as=
{
`/detail/${data.id}`
}
>
<
a
>
{
data
.
id
}
:
{
data
.
name
}
</
a
>
{
data
.
id
}
:
{
data
.
name
}
</
Link
>
)
...
...
examples/with-electron-typescript/renderer/pages/about.tsx
View file @
ab42da06
...
...
@@ -6,9 +6,7 @@ const AboutPage = () => (
<
h1
>
About
</
h1
>
<
p
>
This is the about page
</
p
>
<
p
>
<
Link
href=
"/"
>
<
a
>
Go home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go home
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-electron-typescript/renderer/pages/index.tsx
View file @
ab42da06
...
...
@@ -23,9 +23,7 @@ const IndexPage = () => {
<
h1
>
Hello Next.js 👋
</
h1
>
<
button
onClick=
{
onSayHiClick
}
>
Say hi to electron
</
button
>
<
p
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-electron-typescript/renderer/pages/initial-props.tsx
View file @
ab42da06
...
...
@@ -18,9 +18,7 @@ const WithInitialProps = ({ items }: Props) => {
<
p
>
You are currently on:
{
router
.
pathname
}
</
p
>
<
List
items=
{
items
}
/>
<
p
>
<
Link
href=
"/"
>
<
a
>
Go home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go home
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-facebook-pixel/pages/index.js
View file @
ab42da06
...
...
@@ -18,9 +18,7 @@ export default function Home() {
<
p
>
Click
the
link
below
to
navigate
to
another
page
.
<
br
/>
<
Link
href
=
"/navigation"
>
<
a
>
Navigation
page
<
/a
>
<
/Link
>
<
Link
href
=
"/navigation"
>
Navigation
page
<
/Link
>
<
/p
>
<
/div
>
)
...
...
examples/with-facebook-pixel/pages/navigation.js
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ export default function NavigationPage() {
Navigating
between
pages
will
trigger
a
pageview
event
in
Facebook
Pixel
,
but
will
not
reinitialize
the
pixel
.
<
/p
>
<
Link
href
=
"/"
>
<
a
>
Return
to
home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Return
to
home
<
/Link
>
<
/div
>
)
}
examples/with-fingerprintjs-pro/components/Nav.tsx
View file @
ab42da06
...
...
@@ -20,8 +20,9 @@ const CustomLink: React.FC<PropsWithChildren<{ to: string }>> = ({
query
:
{
cacheStrategy
},
}
}
scroll=
{
false
}
className=
{
className
}
>
<
a
className=
{
className
}
>
{
children
}
</
a
>
{
children
}
</
Link
>
</
div
>
)
...
...
examples/with-firebase-hosting/src/components/Header.jsx
View file @
ab42da06
...
...
@@ -3,11 +3,11 @@ import Link from 'next/link'
const
Header
=
({
pathname
})
=>
(
<
header
>
<
Link
href=
"/"
>
<
a
className=
{
pathname
===
'/'
?
'is-active'
:
''
}
>
Home
</
a
>
<
Link
href=
"/"
className=
{
pathname
===
'/'
?
'is-active'
:
''
}
>
Home
</
Link
>
{
' '
}
<
Link
href=
"/about"
>
<
a
className=
{
pathname
===
'/about'
?
'is-active'
:
''
}
>
About
</
a
>
<
Link
href=
"/about"
className=
{
pathname
===
'/about'
?
'is-active'
:
''
}
>
About
</
Link
>
</
header
>
)
...
...
examples/with-firebase/pages/index.js
View file @
ab42da06
...
...
@@ -45,7 +45,7 @@ export default function Home() {
<
p
className
=
"description"
>
Please
press
the
link
below
after
adding
the
user
<
/p
>
<
Link
href
=
{
`/profile/
${
profile
.
username
}
`
}
passHref
>
<
Link
href
=
{
`/profile/
${
profile
.
username
}
`
}
passHref
legacyBehavior
>
<
a
>
Go
to
SSR
Page
<
/a
>
<
/Link
>
<
/main
>
...
...
examples/with-flow/pages/_app.js
View file @
ab42da06
...
...
@@ -5,17 +5,8 @@ function MyApp({ Component, pageProps }) {
<>
<
header
>
<
nav
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
|
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
|
<
Link
href
=
"/contact"
>
<
a
>
Contact
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link>|<Link href="/
about
">About</Link>|
<Link href="
/
contact
">Contact</Link>
</nav>
</header>
...
...
examples/with-framer-motion/components/Gallery.js
View file @
ab42da06
...
...
@@ -33,7 +33,12 @@ const Thumbnail = ({ id, i }) => (
variants
=
{
frameVariants
}
transition
=
{
transition
}
>
<
Link
href
=
"/image/[index]"
as
=
{
`/image/
${
i
}
`
}
scroll
=
{
false
}
>
<
Link
href
=
"/image/[index]"
as
=
{
`/image/
${
i
}
`
}
scroll
=
{
false
}
legacyBehavior
>
<
motion
.
img
src
=
{
`https://images.unsplash.com/
${
id
}
?auto=format&fit=crop&w=1500`
}
alt
=
"The Barbican"
...
...
examples/with-framer-motion/components/SingleImage.js
View file @
ab42da06
...
...
@@ -32,9 +32,7 @@ const SingleImage = ({ index }) => (
alt
=
"The Barbican"
/>
<
motion
.
div
className
=
"back"
variants
=
{
backVariants
}
>
<
Link
href
=
"/"
>
<
a
>
←
Back
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
←
Back
<
/Link
>
<
/motion.div
>
<
/motion.div
>
<
style
>
...
...
examples/with-google-analytics-amp/components/Header.js
View file @
ab42da06
...
...
@@ -6,19 +6,13 @@ export default function Header() {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/contact"
>
<
a
>
Contact
<
/a
>
<
/Link
>
<
Link
href
=
"/contact"
>
Contact
<
/Link
>
<
/li
>
<
/ul
>
<
/nav
>
...
...
examples/with-google-analytics/components/Header.js
View file @
ab42da06
...
...
@@ -6,19 +6,13 @@ export default function Header() {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/contact"
>
<
a
>
Contact
<
/a
>
<
/Link
>
<
Link
href
=
"/contact"
>
Contact
<
/Link
>
<
/li
>
<
/ul
>
<
/nav
>
...
...
examples/with-graphql-hooks/components/header.js
View file @
ab42da06
...
...
@@ -6,10 +6,10 @@ export default function Header() {
return
(
<
header
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/'
?
'is-active'
:
''
}
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
<
Link
href
=
"/about"
legacyBehavior
>
<
a
className
=
{
pathname
===
'/about'
?
'is-active'
:
''
}
>
About
<
/a
>
<
/Link
>
<
style
jsx
>
{
`
...
...
examples/with-http2/pages/about.js
View file @
ab42da06
...
...
@@ -3,9 +3,7 @@ export default function About() {
return
(
<
div
>
<
h3
>
This
is
the
/
about
page
.
<
/h3
>
<
Link
href
=
"/"
>
<
a
>
&
larr
;
Back
home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>&
larr
;
Back
home
<
/Link
>
<
/div
>
)
}
examples/with-http2/pages/index.js
View file @
ab42da06
...
...
@@ -3,9 +3,7 @@ export default function Home() {
return
(
<
div
>
<
h3
>
Hello
World
.
<
/h3
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/div
>
)
}
examples/with-i18n-next-intl/components/Navigation.js
View file @
ab42da06
...
...
@@ -10,16 +10,12 @@ export default function Navigation() {
return
(
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
10
}}
>
<
Link
href
=
"/"
>
<
a
>
{
t
(
'index'
)}
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
<
a
>
{
t
(
'about'
)}
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
{
t
(
'index'
)}
<
/Link
>
<
Link
href
=
"/about"
>
{
t
(
'about'
)}
<
/Link
>
<
/div
>
{
otherLocale
&&
(
<
Link
href
=
{
route
}
locale
=
{
otherLocale
}
>
<
a
>
{
t
(
'switchLocale'
,
{
locale
:
otherLocale
})}
<
/a
>
{
t
(
'switchLocale'
,
{
locale
:
otherLocale
})}
<
/Link
>
)}
<
/div
>
...
...
examples/with-i18n-rosetta/pages/[lng]/index.js
View file @
ab42da06
...
...
@@ -20,7 +20,7 @@ const HomePage = () => {
<
h3
>
{
i18n
.
t
(
'intro.description'
)}
<
/h3
>
<
div
>
Current
locale
:
{
i18n
.
activeLocale
}
<
/div
>
<
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
>
<
/div
>
)
...
...
examples/with-iron-session/components/Header.tsx
View file @
ab42da06
...
...
@@ -13,13 +13,13 @@ export default function Header() {
<
nav
>
<
ul
>
<
li
>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
>
Home
</
a
>
</
Link
>
</
li
>
{
user
?.
isLoggedIn
===
false
&&
(
<
li
>
<
Link
href=
"/login"
>
<
Link
href=
"/login"
legacyBehavior
>
<
a
>
Login
</
a
>
</
Link
>
</
li
>
...
...
@@ -27,7 +27,7 @@ export default function Header() {
{
user
?.
isLoggedIn
===
true
&&
(
<>
<
li
>
<
Link
href=
"/profile-sg"
>
<
Link
href=
"/profile-sg"
legacyBehavior
>
<
a
>
<
span
style=
{
{
...
...
@@ -49,7 +49,7 @@ export default function Header() {
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/profile-ssr"
>
<
Link
href=
"/profile-ssr"
legacyBehavior
>
<
a
>
Profile (Server-side Rendering)
</
a
>
</
Link
>
</
li
>
...
...
examples/with-lingui/components/LangSwitcher.js
View file @
ab42da06
...
...
@@ -12,10 +12,12 @@ export default function LangSwitcher() {
const
otherLocale
=
locales
?.
find
((
cur
)
=>
cur
!==
locale
)
return
(
<
Link
href
=
{
route
}
locale
=
{
otherLocale
}
>
<
a
style
=
{{
display
:
'block'
,
marginBottom
:
'20px'
}}
>
{
availableLanguageNames
[
otherLocale
]}
<
/a
>
<
Link
href
=
{
route
}
locale
=
{
otherLocale
}
style
=
{{
display
:
'block'
,
marginBottom
:
'20px'
}}
>
{
availableLanguageNames
[
otherLocale
]}
<
/Link
>
)
}
examples/with-lingui/pages/index.js
View file @
ab42da06
...
...
@@ -5,9 +5,7 @@ const Index = () => (
<
div
>
<
Trans
>
Hello
World
.
<
/Trans
>
<
Link
href
=
"/two"
>
<
a
>
<
Trans
>
Go
to
page
2
<
/Trans
>
<
/a
>
<
Trans
>
Go
to
page
2
<
/Trans
>
<
/Link
>
<
br
/>
<
/div
>
...
...
examples/with-lingui/pages/two.js
View file @
ab42da06
...
...
@@ -5,9 +5,7 @@ const Two = () => (
<
div
>
<
Trans
>
Page
two
.
<
/Trans>{' '
}
<
Link
href
=
"/"
>
<
a
>
<
Trans
>
Back
home
<
/Trans
>
<
/a
>
<
Trans
>
Back
home
<
/Trans
>
<
/Link
>
<
br
/>
<
/div
>
...
...
examples/with-loading/pages/_app.tsx
View file @
ab42da06
...
...
@@ -37,13 +37,13 @@ export default function App({ Component, pageProps }: AppProps) {
margin: 0 10px 0 0;
}
`
}
</
style
>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
>
Home
</
a
>
</
Link
>
<
Link
href=
"/about"
>
<
Link
href=
"/about"
legacyBehavior
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/forever"
>
<
Link
href=
"/forever"
legacyBehavior
>
<
a
>
Forever
</
a
>
</
Link
>
<
a
href=
"/non-existing"
>
Non Existing Page
</
a
>
...
...
examples/with-magic/components/header.js
View file @
ab42da06
...
...
@@ -9,14 +9,14 @@ const Header = () => {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
Home
<
/a
>
<
/Link
>
<
/li
>
{
user
?
(
<>
<
li
>
<
Link
href
=
"/profile"
>
<
Link
href
=
"/profile"
legacyBehavior
>
<
a
>
Profile
<
/a
>
<
/Link
>
<
/li
>
...
...
@@ -26,7 +26,7 @@ const Header = () => {
<
/
>
)
:
(
<
li
>
<
Link
href
=
"/login"
>
<
Link
href
=
"/login"
legacyBehavior
>
<
a
>
Login
<
/a
>
<
/Link
>
<
/li
>
...
...
examples/with-mdx-remote/components/CustomLink.js
View file @
ab42da06
...
...
@@ -3,7 +3,7 @@ import Link from 'next/link'
export
default
function
CustomLink
({
as
,
href
,
...
otherProps
})
{
return
(
<>
<
Link
as
=
{
as
}
href
=
{
href
}
>
<
Link
as
=
{
as
}
href
=
{
href
}
legacyBehavior
>
<
a
{...
otherProps
}
/
>
<
/Link
>
<
style
jsx
>
{
`
...
...
examples/with-mdx-remote/pages/index.js
View file @
ab42da06
...
...
@@ -20,7 +20,7 @@ export default function Index({ posts }) {
as
=
{
`/posts/
${
post
.
filePath
.
replace
(
/
\.
mdx
?
$/
,
''
)}
`
}
href
=
{
`/posts/[slug]`
}
>
<
a
>
{
post
.
data
.
title
}
<
/a
>
{
post
.
data
.
title
}
<
/Link
>
<
/li
>
))}
...
...
examples/with-mdx-remote/pages/posts/[slug].js
View file @
ab42da06
...
...
@@ -28,7 +28,7 @@ export default function PostPage({ source, frontMatter }) {
<
Layout
>
<
header
>
<
nav
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
👈
Go
back
home
<
/a
>
<
/Link
>
<
/nav
>
...
...
examples/with-mobx-state-tree/components/SampleComponent.tsx
View file @
ab42da06
...
...
@@ -25,9 +25,7 @@ const SampleComponent: React.FC<IOwnProps> = observer((props) => {
<
h1
>
{
props
.
title
}
</
h1
>
<
Clock
lastUpdate=
{
lastUpdate
}
light=
{
light
}
/>
<
nav
>
<
Link
href=
{
props
.
linkTo
}
>
<
a
>
Navigate
</
a
>
</
Link
>
<
Link
href=
{
props
.
linkTo
}
>
Navigate
</
Link
>
</
nav
>
</
div
>
)
...
...
examples/with-mobx/components/Page.js
View file @
ab42da06
...
...
@@ -23,9 +23,7 @@ const Page = observer(function Page(props) {
<
h1
>
{
props
.
title
}
<
/h1
>
<
Clock
/>
<
nav
>
<
Link
href
=
{
props
.
linkTo
}
>
<
a
>
Navigate
<
/a
>
<
/Link
>
<
Link
href
=
{
props
.
linkTo
}
>
Navigate
<
/Link
>
<
/nav
>
<
/div
>
)
...
...
examples/with-mongodb-mongoose/pages/[id]/index.js
View file @
ab42da06
...
...
@@ -49,7 +49,7 @@ const PetPage = ({ pet }) => {
<
/div
>
<
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
>
<
/Link
>
<
button
className
=
"btn delete"
onClick
=
{
handleDelete
}
>
...
...
examples/with-mongodb-mongoose/pages/_app.js
View file @
ab42da06
...
...
@@ -12,12 +12,8 @@ function MyApp({ Component, pageProps }) {
<
div
className
=
"top-bar"
>
<
div
className
=
"nav"
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/new"
>
<
a
>
Add
Pet
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
Link
href
=
"/new"
>
Add
Pet
<
/Link
>
<
/div
>
<
img
...
...
examples/with-mongodb-mongoose/pages/index.js
View file @
ab42da06
...
...
@@ -33,10 +33,10 @@ const Index = ({ pets }) => (
<
/div
>
<
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
>
<
/Link
>
<
Link
href
=
"/[id]"
as
=
{
`/
${
pet
.
_id
}
`
}
>
<
Link
href
=
"/[id]"
as
=
{
`/
${
pet
.
_id
}
`
}
legacyBehavior
>
<
button
className
=
"btn view"
>
View
<
/button
>
<
/Link
>
<
/div
>
...
...
examples/with-mux-video/pages/asset/[id].js
View file @
ab42da06
...
...
@@ -48,11 +48,7 @@ export default function Asset() {
<>
<
ErrorMessage
message
=
{
errorMessage
}
/
>
<
p
>
Go
{
' '
}
<
Link
href
=
"/"
>
<
a
>
back
home
<
/a
>
<
/Link>{' '
}
to
upload
another
video
.
Go
<
Link
href
=
"/"
>
back
home
<
/Link> to upload another video
.
<
/p
>
<
/
>
)
:
(
...
...
examples/with-mux-video/pages/v/[id].js
View file @
ab42da06
...
...
@@ -53,7 +53,7 @@ export default function Playback({ playbackId, poster }) {
<
MuxPlayer
style
=
{{
width
:
'100%'
}}
playbackId
=
{
playbackId
}
/
>
<
p
>
Go
{
' '
}
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
back
home
<
/a
>
<
/Link>{' '
}
to
upload
another
video
.
...
...
examples/with-neo4j/pages/actor/[name].js
View file @
ab42da06
...
...
@@ -41,6 +41,7 @@ export default function Actor() {
as
=
{{
pathname
:
`/movie/
${
encodeURIComponent
(
movie
)}
`
,
}}
legacyBehavior
>
<
a
>
{
movie
}
<
/a
>
<
/Link
>
...
...
@@ -50,7 +51,7 @@ export default function Actor() {
<
/div
>
<
div
className
=
"back"
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
🔙
Go
Back
<
/a
>
<
/Link
>
<
/div
>
...
...
examples/with-neo4j/pages/index.js
View file @
ab42da06
...
...
@@ -42,7 +42,10 @@ export default function Home() {
<
tr
className
=
"movie"
key
=
{
movie
.
title
}
>
<
th
>
{
index
+
1
}
<
/th
>
<
td
>
<
Link
href
=
{
`/movie/
${
encodeURIComponent
(
movie
.
title
)}
`
}
>
<
Link
href
=
{
`/movie/
${
encodeURIComponent
(
movie
.
title
)}
`
}
legacyBehavior
>
<
a
className
=
"link"
>
{
movie
.
title
}
<
/a
>
<
/Link
>
<
/td
>
...
...
@@ -59,7 +62,10 @@ export default function Home() {
<
ul
>
{
movie
.
actors
.
map
((
actor
)
=>
(
<
li
key
=
{
actor
}
>
<
Link
href
=
{
`/actor/
${
encodeURIComponent
(
actor
)}
`
}
>
<
Link
href
=
{
`/actor/
${
encodeURIComponent
(
actor
)}
`
}
legacyBehavior
>
<
a
className
=
"link"
>
{
actor
}
<
/a
>
<
/Link
>
<
/li
>
...
...
examples/with-neo4j/pages/movie/[title].js
View file @
ab42da06
...
...
@@ -40,7 +40,11 @@ export default function Movie() {
<
h2
>
Actors
<
/h2
>
{
data
.
movie
.
actors
.
map
((
actor
)
=>
(
<
div
key
=
{
actor
}
>
<
Link
key
=
{
actor
}
href
=
{
`/actor/
${
encodeURIComponent
(
actor
)}
`
}
>
<
Link
key
=
{
actor
}
href
=
{
`/actor/
${
encodeURIComponent
(
actor
)}
`
}
legacyBehavior
>
<
a
className
=
"link"
>
{
actor
}
<
/a
>
<
/Link
>
<
/div
>
...
...
@@ -55,7 +59,7 @@ export default function Movie() {
<
/div
>
<
div
className
=
"back"
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
🔙
Go
Back
<
/a
>
<
/Link
>
<
/div
>
...
...
examples/with-netlify-cms/components/layout.js
View file @
ab42da06
...
...
@@ -3,13 +3,13 @@ import Link from 'next/link'
const
Layout
=
({
children
})
=>
(
<>
<
nav
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
home
<
/a
>
<
/Link
>
<
Link
href
=
"/blog"
>
<
Link
href
=
"/blog"
legacyBehavior
>
<
a
>
blog
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
<
Link
href
=
"/about"
legacyBehavior
>
<
a
>
about
<
/a
>
<
/Link
>
<
/nav
>
...
...
examples/with-netlify-cms/pages/blog/index.js
View file @
ab42da06
...
...
@@ -20,7 +20,11 @@ const Blog = ({ postsList }) => (
<
Layout
>
{
postsList
.
map
((
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
>
<
img
src
=
{
post
.
attributes
.
thumbnail
}
/
>
<
h2
>
{
post
.
attributes
.
title
}
<
/h2
>
...
...
examples/with-next-page-transitions/pages/about.js
View file @
ab42da06
...
...
@@ -25,8 +25,8 @@ const About = (props) => {
Notice
how
a
loading
spinner
showed
up
while
my
content
was
"loading"
?
Pretty
neat
,
huh
?
<
/p
>
<
Link
href
=
"/"
>
<
a
className
=
"btn btn-light"
>
Go
back
home
<
/a
>
<
Link
href
=
"/"
className
=
"btn btn-light"
>
Go
back
home
<
/Link
>
<
/div
>
)
...
...
examples/with-next-page-transitions/pages/index.js
View file @
ab42da06
...
...
@@ -3,8 +3,8 @@ import Link from 'next/link'
const
Index
=
()
=>
(
<
div
className
=
"container bg-primary page"
>
<
h1
>
Hello
,
world
!<
/h1
>
<
Link
href
=
"/about"
>
<
a
className
=
"btn btn-light"
>
About
us
<
/a
>
<
Link
href
=
"/about"
className
=
"btn btn-light"
>
About
us
<
/Link
>
<
/div
>
)
...
...
examples/with-next-seo/pages/index.js
View file @
ab42da06
...
...
@@ -33,11 +33,8 @@ export default function Home() {
<
h1
>
SEO
Added
to
Page
<
/h1
>
<
p
>
Take
a
look
at
the
head
to
see
what
has
been
added
.
<
/p
>
<
p
>
Or
checkout
how
{
' '
}
<
Link
href
=
"/jsonld"
>
<
a
>
JSON
-
LD
<
/a
>
<
/Link>{' '
}
(
Structured
Data
)
is
added
Or
checkout
how
<
Link
href
=
"/jsonld"
>
JSON
-
LD
<
/Link>
(
Structured Data
)
i
s
added
<
/p
>
<
/div
>
)
...
...
examples/with-next-sitemap/pages/index.tsx
View file @
ab42da06
...
...
@@ -6,27 +6,27 @@ const IndexPage = () => (
<
ol
>
<
li
>
<
Link
href=
"/[dynamic]"
as=
"/page-1"
>
<
a
>
Link to dynamic page 1
</
a
>
Link to dynamic page 1
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/[dynamic]"
as=
"/page-2"
>
<
a
>
Link to dynamic page 2
</
a
>
Link to dynamic page 2
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/[dynamic]"
as=
"/page-3"
>
<
a
>
Link to dynamic page 3
</
a
>
Link to dynamic page 3
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/[dynamic]"
as=
"/page-4"
>
<
a
>
Link to dynamic page 4
</
a
>
Link to dynamic page 4
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/[dynamic]"
as=
"/page-5"
>
<
a
>
Link to dynamic page 5
</
a
>
Link to dynamic page 5
</
Link
>
</
li
>
</
ol
>
...
...
examples/with-next-translate/pages/index.js
View file @
ab42da06
...
...
@@ -24,7 +24,7 @@ export default function Home() {
<
/p
>
<
div
className
=
"grid"
>
<
Link
href
=
"/"
locale
=
"en"
>
<
Link
href
=
"/"
locale
=
"en"
legacyBehavior
>
<
div
className
=
"card"
>
<
h3
>
{
t
(
'home:english'
)}
<
/h3
>
<
p
>
...
...
@@ -33,7 +33,7 @@ export default function Home() {
<
/div
>
<
/Link
>
<
Link
href
=
"/"
locale
=
"ca"
>
<
Link
href
=
"/"
locale
=
"ca"
legacyBehavior
>
<
div
className
=
"card"
>
<
h3
>
{
t
(
'home:catalan'
)}
<
/h3
>
<
p
>
...
...
@@ -42,7 +42,7 @@ export default function Home() {
<
/div
>
<
/Link
>
<
Link
href
=
"/"
locale
=
"ar"
>
<
Link
href
=
"/"
locale
=
"ar"
legacyBehavior
>
<
div
className
=
"card"
>
<
h3
>
{
t
(
'home:arabic'
)}
<
/h3
>
<
p
>
...
...
@@ -51,7 +51,7 @@ export default function Home() {
<
/div
>
<
/Link
>
<
Link
href
=
"/"
locale
=
"he"
>
<
Link
href
=
"/"
locale
=
"he"
legacyBehavior
>
<
div
className
=
"card"
>
<
h3
>
{
t
(
'home:hebrew'
)}
<
/h3
>
<
p
>
...
...
examples/with-overmind/components/Header.js
View file @
ab42da06
...
...
@@ -8,12 +8,8 @@ function Header() {
return
(
<
div
>
<
h1
>
{
state
.
page
}
<
/h1
>
<
Link
href
=
"/"
>
<
a
>
Home
page
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
<
a
>
About
Page
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
page
<
/Link
>
<
Link
href
=
"/about"
>
About
Page
<
/Link
>
<
/div
>
)
}
...
...
examples/with-passport-and-next-connect/components/Navbar.js
View file @
ab42da06
...
...
@@ -14,12 +14,16 @@ export default function Navbar() {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
Link
href
=
"/"
legacyBehavior
>
Home
<
/Link
>
<
/li
>
{
user
?
(
<>
<
li
>
<
Link
href
=
"/profile"
>
Profile
<
/Link
>
<
Link
href
=
"/profile"
legacyBehavior
>
Profile
<
/Link
>
<
/li
>
<
li
>
<
a
role
=
"button"
onClick
=
{
handleLogout
}
>
...
...
@@ -30,10 +34,14 @@ export default function Navbar() {
)
:
(
<>
<
li
>
<
Link
href
=
"/signup"
>
Sign
up
<
/Link
>
<
Link
href
=
"/signup"
legacyBehavior
>
Sign
up
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/login"
>
Login
<
/Link
>
<
Link
href
=
"/login"
legacyBehavior
>
Login
<
/Link
>
<
/li
>
<
/
>
)}
...
...
examples/with-passport/components/form.js
View file @
ab42da06
...
...
@@ -20,14 +20,14 @@ const Form = ({ isLogin, errorMessage, onSubmit }) => (
<
div
className
=
"submit"
>
{
isLogin
?
(
<>
<
Link
href
=
"/signup"
>
<
Link
href
=
"/signup"
legacyBehavior
>
<
a
>
I
don
't have an account</a>
</Link>
<button type="submit">Login</button>
</>
) : (
<>
<Link href="/login">
<Link href="/login"
legacyBehavior
>
<a>I already have an account</a>
</Link>
<button type="submit">Signup</button>
...
...
examples/with-passport/components/header.js
View file @
ab42da06
...
...
@@ -9,14 +9,14 @@ const Header = () => {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
Home
<
/a
>
<
/Link
>
<
/li
>
{
user
?
(
<>
<
li
>
<
Link
href
=
"/profile"
>
<
Link
href
=
"/profile"
legacyBehavior
>
<
a
>
Profile
<
/a
>
<
/Link
>
<
/li
>
...
...
@@ -26,7 +26,7 @@ const Header = () => {
<
/
>
)
:
(
<
li
>
<
Link
href
=
"/login"
>
<
Link
href
=
"/login"
legacyBehavior
>
<
a
>
Login
<
/a
>
<
/Link
>
<
/li
>
...
...
examples/with-plausible/components/Header.js
View file @
ab42da06
...
...
@@ -6,19 +6,13 @@ export default function Header() {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/contact"
>
<
a
>
Contact
<
/a
>
<
/Link
>
<
Link
href
=
"/contact"
>
Contact
<
/Link
>
<
/li
>
<
/ul
>
<
/nav
>
...
...
examples/with-playwright/pages/about.js
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ export default function About() {
<
main
className
=
{
styles
.
main
}
>
<
h1
>
About
Page
<
/h1
>
<
p
className
=
{
styles
.
description
}
>
<
Link
href
=
"/"
>
<
a
>&
larr
;
Go
Back
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>&
larr
;
Go
Back
<
/Link
>
<
/p
>
<
/main
>
<
/div
>
...
...
examples/with-playwright/pages/index.js
View file @
ab42da06
...
...
@@ -23,11 +23,9 @@ export default function Home() {
<
/p
>
<
div
className
=
{
styles
.
grid
}
>
<
Link
href
=
"/about"
>
<
a
className
=
{
styles
.
card
}
>
<
h2
>
About
Page
&
rarr
;
<
/h2
>
<
p
>
Playwright
will
test
if
this
link
is
working
.
<
/p
>
<
/a
>
<
Link
href
=
"/about"
className
=
{
styles
.
card
}
>
<
h2
>
About
Page
&
rarr
;
<
/h2
>
<
p
>
Playwright
will
test
if
this
link
is
working
.
<
/p
>
<
/Link
>
<
a
href
=
"https://nextjs.org/docs"
className
=
{
styles
.
card
}
>
...
...
examples/with-prefetching/components/Nav.tsx
View file @
ab42da06
...
...
@@ -10,15 +10,15 @@ export default function Nav() {
Automatically prefetch pages in the background as soon the Link appears
in the view:
</
p
>
<
Link
href=
"/"
>
<
Link
href=
"/"
legacyBehavior
>
<
a
>
Home
</
a
>
</
Link
>
{
' '
}
<
Link
href=
"/features"
>
<
Link
href=
"/features"
legacyBehavior
>
<
a
>
Features
</
a
>
</
Link
>
<
h2
>
Imperative
</
h2
>
<
p
>
Prefetch on onMouseEnter or on other events:
</
p
>
<
Link
prefetch=
{
false
}
href=
"/about"
>
<
Link
prefetch=
{
false
}
href=
"/about"
legacyBehavior
>
<
a
onMouseEnter=
{
()
=>
{
router
.
prefetch
(
'/about'
)
...
...
@@ -30,7 +30,7 @@ export default function Nav() {
</
Link
>
<
h2
>
Disable
</
h2
>
<
p
>
Disable prefetching
</
p
>
<
Link
prefetch=
{
false
}
href=
"/contact"
>
<
Link
prefetch=
{
false
}
href=
"/contact"
legacyBehavior
>
<
a
>
Contact
</
a
>
</
Link
>
<
style
jsx
>
{
`
...
...
examples/with-rbx-bulma-pro/components/Layout.js
View file @
ab42da06
...
...
@@ -20,13 +20,13 @@ const Layout = ({ children }) => {
<
/Navbar.Brand
>
<
Navbar
.
Menu
>
<
Navbar
.
Segment
align
=
"start"
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
Navbar
.
Item
>
Home
<
/Navbar.Item
>
<
/Link
>
<
Link
href
=
"/about"
>
<
Link
href
=
"/about"
legacyBehavior
>
<
Navbar
.
Item
>
About
<
/Navbar.Item
>
<
/Link
>
<
Link
href
=
"/contact"
>
<
Link
href
=
"/contact"
legacyBehavior
>
<
Navbar
.
Item
>
Contact
<
/Navbar.Item
>
<
/Link
>
<
/Navbar.Segment
>
...
...
examples/with-rbx-bulma-pro/pages/index.js
View file @
ab42da06
...
...
@@ -9,10 +9,8 @@ const Home = () => (
<
Card
.
Content
>
<
Content
>
<
Link
href
=
"https://github.com/vercel/next.js#getting-started"
>
<
a
>
<
Title
as
=
"h3"
>
Getting
Started
&
rarr
;
<
/Title
>
<
p
>
Learn
more
about
Next
on
Github
and
in
their
examples
<
/p
>
<
/a
>
<
Title
as
=
"h3"
>
Getting
Started
&
rarr
;
<
/Title
>
<
p
>
Learn
more
about
Next
on
Github
and
in
their
examples
<
/p
>
<
/Link
>
<
/Content
>
<
/Card.Content
>
...
...
@@ -21,13 +19,11 @@ const Home = () => (
<
Card
.
Content
>
<
Content
>
<
Link
href
=
"https://github.com/vercel/next.js/tree/canary/examples"
>
<
a
>
<
Title
as
=
"h3"
>
Examples
&
rarr
;
<
/Title
>
<
p
>
Find
other
example
boilerplates
on
the
{
' '
}
<
code
>
create
-
next
-
app
<
/code> sit
e
<
/p
>
<
/a
>
<
Title
as
=
"h3"
>
Examples
&
rarr
;
<
/Title
>
<
p
>
Find
other
example
boilerplates
on
the
{
' '
}
<
code
>
create
-
next
-
app
<
/code> sit
e
<
/p
>
<
/Link
>
<
/Content
>
<
/Card.Content
>
...
...
@@ -36,10 +32,8 @@ const Home = () => (
<
Card
.
Content
>
<
Content
>
<
Link
href
=
"https://github.com/vercel/next.js/tree/canary/packages/create-next-app"
>
<
a
>
<
Title
as
=
"h3"
>
Create
Next
App
&
rarr
;
<
/Title
>
<
p
>
Was
this
tool
helpful
?
Let
us
know
how
we
can
improve
it
<
/p
>
<
/a
>
<
Title
as
=
"h3"
>
Create
Next
App
&
rarr
;
<
/Title
>
<
p
>
Was
this
tool
helpful
?
Let
us
know
how
we
can
improve
it
<
/p
>
<
/Link
>
<
/Content
>
<
/Card.Content
>
...
...
examples/with-react-foundation/src/pages/index.tsx
View file @
ab42da06
...
...
@@ -16,7 +16,7 @@ export default function Home() {
<
code
>
react-foundation
</
code
>
.
</
p
>
<
Link
href=
"https://nextjs.org"
passHref=
{
true
}
>
<
a
>
view repository
</
a
>
view repository
</
Link
>
</
Callout
>
</
div
>
...
...
examples/with-react-ga/pages/index.js
View file @
ab42da06
...
...
@@ -3,10 +3,7 @@ import Link from 'next/link'
export
default
function
Home
()
{
return
(
<
div
>
Hello
World
.{
' '
}
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
Hello
World
.
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/div
>
)
}
examples/with-react-intl/components/Nav.tsx
View file @
ab42da06
...
...
@@ -9,22 +9,18 @@ export default function Nav() {
<
nav
className=
{
styles
.
nav
}
>
<
li
className=
{
styles
.
li
}
>
<
Link
href=
"/"
passHref
>
<
a
>
<
FormattedMessage
defaultMessage=
"Home"
description=
"Nav: Index name"
/>
</
a
>
<
FormattedMessage
defaultMessage=
"Home"
description=
"Nav: Index name"
/>
</
Link
>
</
li
>
<
li
className=
{
styles
.
li
}
>
<
Link
href=
"/about"
passHref
>
<
a
>
<
FormattedMessage
defaultMessage=
"About"
description=
"Nav: About item"
/>
</
a
>
<
FormattedMessage
defaultMessage=
"About"
description=
"Nav: About item"
/>
</
Link
>
</
li
>
...
...
@@ -37,12 +33,9 @@ export default function Nav() {
locale=
{
availableLocale
}
passHref
prefetch=
{
false
}
className=
{
availableLocale
===
locale
?
styles
.
active
:
undefined
}
>
<
a
className=
{
availableLocale
===
locale
?
styles
.
active
:
undefined
}
>
{
availableLocale
}
</
a
>
{
availableLocale
}
</
Link
>
</
li
>
))
}
...
...
examples/with-react-md-typescript/components/LinkUnstyled.tsx
View file @
ab42da06
...
...
@@ -30,8 +30,9 @@ export default function LinkUnstyled({
replace=
{
replace
}
href=
{
href
}
as=
{
as
}
{
...
props
}
>
<
a
{
...
props
}
>
{
children
}
</
a
>
{
children
}
</
Link
>
)
}
examples/with-react-md/components/LinkUnstyled.jsx
View file @
ab42da06
...
...
@@ -26,8 +26,9 @@ export default function LinkUnstyled({
replace=
{
replace
}
href=
{
href
}
as=
{
as
}
{
...
props
}
>
<
a
{
...
props
}
>
{
children
}
</
a
>
{
children
}
</
Link
>
)
}
examples/with-redux-observable/pages/index.js
View file @
ab42da06
...
...
@@ -20,9 +20,7 @@ const Counter = () => {
<
UserInfo
/>
<
br
/>
<
nav
>
<
Link
href
=
"/other"
>
<
a
>
Navigate
to
"/other"
<
/a
>
<
/Link
>
<
Link
href
=
"/other"
>
Navigate
to
"/other"
<
/Link
>
<
/nav
>
<
/div
>
)
...
...
examples/with-redux-observable/pages/other.js
View file @
ab42da06
...
...
@@ -3,9 +3,7 @@ import Link from 'next/link'
const
OtherPage
=
()
=>
(
<
div
>
<
h1
>
Other
Page
<
/h1
>
<
Link
href
=
"/"
>
<
a
>
Get
back
to
"/"
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Get
back
to
"/"
<
/Link
>
<
/div
>
)
...
...
examples/with-redux-saga/components/page.js
View file @
ab42da06
...
...
@@ -15,9 +15,7 @@ function Page({ linkTo, NavigateTo, title }) {
<
Clock
lastUpdate
=
{
lastUpdate
}
light
=
{
light
}
/
>
<
Counter
/>
<
nav
>
<
Link
href
=
{
linkTo
}
>
<
a
>
Navigate
:
{
NavigateTo
}
<
/a
>
<
/Link
>
<
Link
href
=
{
linkTo
}
>
Navigate
:{
NavigateTo
}
<
/Link
>
<
/nav
>
{
placeholderData
&&
(
<
pre
>
...
...
examples/with-redux-thunk/pages/index.js
View file @
ab42da06
...
...
@@ -13,9 +13,7 @@ const Index = () => {
return
(
<>
<
Examples
/>
<
Link
href
=
"/show-redux-state"
>
<
a
>
Click
to
see
current
Redux
State
<
/a
>
<
/Link
>
<
Link
href
=
"/show-redux-state"
>
Click
to
see
current
Redux
State
<
/Link
>
<
/
>
)
}
...
...
examples/with-redux-thunk/pages/show-redux-state.js
View file @
ab42da06
...
...
@@ -17,9 +17,7 @@ const ShowReduxState = () => {
<
pre
style
=
{
codeStyle
}
>
<
code
>
{
JSON
.
stringify
(
state
,
null
,
4
)}
<
/code
>
<
/pre
>
<
Link
href
=
"/"
>
<
a
>
Go
Back
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Go
Back
Home
<
/Link
>
<
/
>
)
}
...
...
examples/with-redux-wrapper/components/Page.js
View file @
ab42da06
...
...
@@ -9,9 +9,7 @@ const Page = ({ title, linkTo, tick }) => (
<
Clock
lastUpdate
=
{
tick
.
lastUpdate
}
light
=
{
tick
.
light
}
/
>
<
AddCount
/>
<
nav
>
<
Link
href
=
{
linkTo
}
>
<
a
>
Navigate
<
/a
>
<
/Link
>
<
Link
href
=
{
linkTo
}
>
Navigate
<
/Link
>
<
/nav
>
<
/div
>
)
...
...
examples/with-relay-modern/pages/about.js
View file @
ab42da06
...
...
@@ -3,9 +3,7 @@ import Link from 'next/link'
export
default
function
About
()
{
return
(
<
div
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
p
>
This
is
the
about
page
<
/p
>
<
/div
>
)
...
...
examples/with-relay-modern/pages/index.js
View file @
ab42da06
...
...
@@ -6,9 +6,7 @@ import indexPageQuery from '../queries/indexPage'
const
Index
=
({
viewer
})
=>
(
<
div
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
BlogPosts
viewer
=
{
viewer
}
/
>
<
/div
>
)
...
...
examples/with-route-as-modal/components/Grid.js
View file @
ab42da06
...
...
@@ -9,8 +9,13 @@ export default function PostCardGrid() {
<
h2
>
With
QueryString
Routing
,
and
a
reload
won
't use the modal</h2>
<div className={styles.postCardGrid}>
{data.map((id, index) => (
<Link key={index} href={`/?postId=${id}`} as={`/post/${id}`}>
<a className={styles.postCard}>{id}</a>
<Link
key={index}
href={`/?postId=${id}`}
as={`/post/${id}`}
className={styles.postCard}
>
{id}
</Link>
))}
</div>
...
...
@@ -18,8 +23,13 @@ export default function PostCardGrid() {
<h2>With Dynamic Routing, and reloads will keep the modal</h2>
<div className={styles.postCardGrid}>
{data.map((id, index) => (
<Link key={index} href="/article/[articleId]" as={`/article/${id}`}>
<a className={styles.postCard}>{id}</a>
<Link
key={index}
href="/article/[articleId]"
as={`/article/${id}`}
className={styles.postCard}
>
{id}
</Link>
))}
</div>
...
...
examples/with-segment-analytics/components/Header.js
View file @
ab42da06
...
...
@@ -7,19 +7,13 @@ export default function Header() {
<
nav
>
<
ul
>
<
li
>
<
Link
href
=
"/"
>
<
a
>
Home
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Home
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/contact"
>
<
a
>
Contact
<
/a
>
<
/Link
>
<
Link
href
=
"/contact"
>
Contact
<
/Link
>
<
/li
>
<
/ul
>
<
/nav
>
...
...
examples/with-sentry/pages/index.js
View file @
ab42da06
...
...
@@ -82,10 +82,7 @@ const Index = () => (
<a href="/ssr/test1" target="_blank">
Open in a new tab
</a>{'
'}
or{'
'}
<Link href="/ssr/test1">
<a>Perform client side navigation</a>
</Link>
or <Link href="/ssr/test1">Perform client side navigation</Link>
</li>
<li>
getServerSideProps returns a Promise that rejects. This should cause
...
...
@@ -117,10 +114,7 @@ const Index = () => (
<li>
There is a top-of-module Promise that rejects, but its result is not
awaited. Sentry should record Error('
Client
Test
1
').{'
'}
<Link href="/client/test1">
<a>Perform client side navigation</a>
</Link>{'
'}
or{'
'}
<Link href="/client/test1">Perform client side navigation</Link> or{'
'}
<a href="/client/test1" target="_blank">
Open in a new tab
</a>
...
...
@@ -128,10 +122,7 @@ const Index = () => (
<li>
There is a top-of-module exception. _error.js should render and record
ReferenceError('
process
is
not
defined
') in Sentry.{'
'}
<Link href="/client/test2">
<a>Perform client side navigation</a>
</Link>{'
'}
or{'
'}
<Link href="/client/test2">Perform client side navigation</Link> or{'
'}
<a href="/client/test2" target="_blank">
Open in a new tab
</a>
...
...
@@ -141,10 +132,7 @@ const Index = () => (
Next.js'
s
React
Error
Boundary
.
In
this
case
,
when
the
component
mounts
.
This
should
cause
_error
.
js
to
render
and
record
Error
(
'Client
Test 3'
)
in
Sentry
.{
' '
}
<
Link
href
=
"/client/test3"
>
<
a
>
Perform
client
side
navigation
<
/a
>
<
/Link>{' '
}
or
{
' '
}
<
Link
href
=
"/client/test3"
>
Perform
client
side
navigation
<
/Link> or{' '
}
<
a
href
=
"/client/test3"
target
=
"_blank"
>
Open
in
a
new
tab
<
/a
>
...
...
@@ -153,10 +141,7 @@ const Index = () => (
There
is
an
unhandled
Promise
rejection
during
React
lifecycle
.
In
this
case
,
when
the
component
mounts
.
Sentry
should
record
Error
(
'Client Test 4'
).{
' '
}
<
Link
href
=
"/client/test4"
>
<
a
>
Perform
client
side
navigation
<
/a
>
<
/Link>{' '
}
or
{
' '
}
<
Link
href
=
"/client/test4"
>
Perform
client
side
navigation
<
/Link> or{' '
}
<
a
href
=
"/client/test4"
target
=
"_blank"
>
Open
in
a
new
tab
<
/a
>
...
...
@@ -165,10 +150,7 @@ const Index = () => (
An
Error
is
thrown
from
an
event
handler
.
Sentry
should
record
Error
(
'Client Test 5'
).
(
This
page
also
demonstrates
how
to
manually
instrument
your
code
for
performance
monitoring
.){
' '
}
<
Link
href
=
"/client/test5"
>
<
a
>
Perform
client
side
navigation
<
/a
>
<
/Link>{' '
}
or
{
' '
}
<
Link
href
=
"/client/test5"
>
Perform
client
side
navigation
<
/Link> or{' '
}
<
a
href
=
"/client/test5"
target
=
"_blank"
>
Open
in
a
new
tab
<
/a
>
...
...
examples/with-sfcc/components/ProductCard.js
View file @
ab42da06
...
...
@@ -10,30 +10,28 @@ export default function ProductCard({ product }) {
const
[
isLoading
,
setLoading
]
=
useState
(
true
)
return
(
<
Link
href
=
{
`/products/
${
product
.
id
}
`
}
>
<
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"
>
<
Image
alt
=
""
src
=
{
product
.
imageGroups
[
0
].
images
[
0
].
link
}
fill
className
=
{
cn
(
'object-cover duration-700 ease-in-out group-hover:opacity-75 '
,
isLoading
?
'scale-110 blur-2xl grayscale'
:
'scale-100 blur-0 grayscale-0'
)}
onLoadingComplete
=
{()
=>
setLoading
(
false
)}
/
>
<
/div
>
<
div
className
=
"mt-4 flex items-center justify-between text-base font-medium text-gray-900"
>
<
h3
>
{
product
.
name
}
<
/h3
>
<
p
>
$
{
product
.
price
}
<
/p
>
<
/div
>
<
p
className
=
"mt-1 text-sm italic text-gray-500"
>
{
product
.
shortDescription
}
<
/p
>
<
/a
>
<
Link
href
=
{
`/products/
${
product
.
id
}
`
}
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"
>
<
Image
alt
=
""
src
=
{
product
.
imageGroups
[
0
].
images
[
0
].
link
}
fill
className
=
{
cn
(
'object-cover duration-700 ease-in-out group-hover:opacity-75 '
,
isLoading
?
'scale-110 blur-2xl grayscale'
:
'scale-100 blur-0 grayscale-0'
)}
onLoadingComplete
=
{()
=>
setLoading
(
false
)}
/
>
<
/div
>
<
div
className
=
"mt-4 flex items-center justify-between text-base font-medium text-gray-900"
>
<
h3
>
{
product
.
name
}
<
/h3
>
<
p
>
$
{
product
.
price
}
<
/p
>
<
/div
>
<
p
className
=
"mt-1 text-sm italic text-gray-500"
>
{
product
.
shortDescription
}
<
/p
>
<
/Link
>
)
}
examples/with-shallow-routing/pages/index.js
View file @
ab42da06
...
...
@@ -25,9 +25,7 @@ export default function Index({ initialPropsCounter }) {
return
(
<
div
>
<
h2
>
This
is
the
Home
Page
<
/h2
>
<
Link
href
=
"/about"
>
<
a
>
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
<
/Link
>
<
button
onClick
=
{
reload
}
>
Reload
<
/button
>
<
button
onClick
=
{
incrementCounter
}
>
Change
State
Counter
<
/button
>
<
p
>
"getServerSideProps"
ran
for
"{initialPropsCounter}"
times
.
<
/p
>
...
...
examples/with-static-export/components/post.tsx
View file @
ab42da06
...
...
@@ -6,9 +6,7 @@ export default function Post({ title, body, id }: PostData) {
<
article
>
<
h2
>
{
title
}
</
h2
>
<
p
>
{
body
}
</
p
>
<
Link
href=
{
`/post/${id}`
}
>
<
a
>
Read more...
</
a
>
</
Link
>
<
Link
href=
{
`/post/${id}`
}
>
Read more...
</
Link
>
</
article
>
)
}
examples/with-static-export/pages/post/[id].tsx
View file @
ab42da06
...
...
@@ -47,9 +47,7 @@ const Post: NextPage<PostDataProps> = ({ postData }: PostDataProps) => {
<
p
>
{
postData
.
body
}
</
p
>
<
Link
href=
"/"
>
<
a
>
Go back to home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go back to home
</
Link
>
</
main
>
)
}
...
...
examples/with-storybook-styled-jsx-scss/components/Page.tsx
View file @
ab42da06
...
...
@@ -32,17 +32,26 @@ export const Page: React.FC<PageProps> = ({
<
p
>
This example combines the following other examples:
</
p
>
<
ul
>
<
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
>
</
Link
>
</
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
>
</
Link
>
</
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
>
</
Link
>
</
li
>
...
...
@@ -62,7 +71,10 @@ export const Page: React.FC<PageProps> = ({
</
p
>
<
p
>
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
>
</
Link
>
</
p
>
...
...
examples/with-stripe-typescript/components/Layout.tsx
View file @
ab42da06
...
...
@@ -31,10 +31,8 @@ const Layout = ({
<
div
className=
"container"
>
<
header
>
<
div
className=
"header-content"
>
<
Link
href=
"/"
>
<
a
className=
"logo"
>
<
img
src=
"/logo.png"
/>
</
a
>
<
Link
href=
"/"
className=
"logo"
>
<
img
src=
"/logo.png"
/>
</
Link
>
<
h1
>
<
span
className=
"light"
>
Stripe Sample
</
span
>
...
...
examples/with-stripe-typescript/pages/index.tsx
View file @
ab42da06
...
...
@@ -7,27 +7,30 @@ const IndexPage: NextPage = () => {
<
Layout
title=
"Home | Next.js + TypeScript Example"
>
<
ul
className=
"card-list"
>
<
li
>
<
Link
href=
"/donate-with-checkout"
>
<
a
className=
"card checkout-style-background"
>
<
h2
className=
"bottom"
>
Donate with Checkout
</
h2
>
<
img
src=
"/checkout-one-time-payments.svg"
/>
</
a
>
<
Link
href=
"/donate-with-checkout"
className=
"card checkout-style-background"
>
<
h2
className=
"bottom"
>
Donate with Checkout
</
h2
>
<
img
src=
"/checkout-one-time-payments.svg"
/>
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/donate-with-elements"
>
<
a
className=
"card elements-style-background"
>
<
h2
className=
"bottom"
>
Donate with Elements
</
h2
>
<
img
src=
"/elements-card-payment.svg"
/>
</
a
>
<
Link
href=
"/donate-with-elements"
className=
"card elements-style-background"
>
<
h2
className=
"bottom"
>
Donate with Elements
</
h2
>
<
img
src=
"/elements-card-payment.svg"
/>
</
Link
>
</
li
>
<
li
>
<
Link
href=
"/use-shopping-cart"
>
<
a
className=
"card cart-style-background"
>
<
h2
className=
"bottom"
>
Use Shopping Cart
</
h2
>
<
img
src=
"/use-shopping-cart.png"
/>
</
a
>
<
Link
href=
"/use-shopping-cart"
className=
"card cart-style-background"
>
<
h2
className=
"bottom"
>
Use Shopping Cart
</
h2
>
<
img
src=
"/use-shopping-cart.png"
/>
</
Link
>
</
li
>
</
ul
>
...
...
examples/with-styled-components/components/cards.tsx
View file @
ab42da06
...
...
@@ -33,7 +33,7 @@ const StyledA = styled.a`
`
const
StyledLink
=
({
href
,
name
})
=>
(
<
Link
href=
{
href
}
passHref
>
<
Link
href=
{
href
}
passHref
legacyBehavior
>
<
StyledA
>
{
name
}
</
StyledA
>
</
Link
>
)
...
...
examples/with-styled-components/pages/about.tsx
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ export default function About() {
<
Main
>
<
Title
>
About Page
</
Title
>
<
Description
>
<
Link
href=
"/"
>
<
a
>
←
Go Back
</
a
>
</
Link
>
<
Link
href=
"/"
>
←
Go Back
</
Link
>
</
Description
>
</
Main
>
</
Container
>
...
...
examples/with-supabase-auth-realtime-db/pages/index.js
View file @
ab42da06
...
...
@@ -99,9 +99,7 @@ const Index = () => {
)}
<Typography.Text>
<Link href="/profile">
<a>SSR example with getServerSideProps</a>
</Link>
<Link href="/profile">SSR example with getServerSideProps</Link>
</Typography.Text>
</>
)}
...
...
examples/with-supabase-auth-realtime-db/pages/profile.js
View file @
ab42da06
...
...
@@ -18,9 +18,7 @@ export default function Profile({ user }) {
</Typography.Text>
<Typography.Text>
<Link href="/">
<a>Static example with useSWR</a>
</Link>
<Link href="/">Static example with useSWR</Link>
</Typography.Text>
</Space>
</Card>
...
...
examples/with-temporal/components/Layout.tsx
View file @
ab42da06
...
...
@@ -14,13 +14,7 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</
Head
>
<
header
>
<
nav
>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
{
' '
}
|
{
' '
}
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
{
' '
}
<
Link
href=
"/"
>
Home
</
Link
>
|
<
Link
href=
"/about"
>
About
</
Link
>
{
' '
}
</
nav
>
</
header
>
{
children
}
...
...
examples/with-temporal/pages/about.tsx
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ const AboutPage: NextPage = () => (
<
h1
>
About
</
h1
>
<
p
>
This is the about page
</
p
>
<
p
>
<
Link
href=
"/"
>
<
a
>
Go home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go home
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-temporal/pages/index.tsx
View file @
ab42da06
...
...
@@ -23,9 +23,7 @@ const IndexPage = () => (
</
button
>
<
p
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-tesfy/components/nav.js
View file @
ab42da06
...
...
@@ -3,12 +3,7 @@ import Link from 'next/link'
const
Nav
=
()
=>
{
return
(
<
nav
>
<
Link
href
=
"/"
>
<
a
>
Experiments
<
/a
>
<
/Link>{' '
}
<
Link
href
=
"/features"
>
<
a
>
Features
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Experiments
<
/Link> <Link href="/
features
">Features</Link>
</nav>
)
}
...
...
examples/with-three-js/pages/index.js
View file @
ab42da06
...
...
@@ -3,12 +3,8 @@ import Link from 'next/link'
export
default
function
IndexPage
()
{
return
(
<
div
className
=
"main"
>
<
Link
href
=
"/birds"
>
<
a
>
Birds
Example
<
/a
>
<
/Link
>
<
Link
href
=
"/boxes"
>
<
a
>
Boxes
Example
<
/a
>
<
/Link
>
<
Link
href
=
"/birds"
>
Birds
Example
<
/Link
>
<
Link
href
=
"/boxes"
>
Boxes
Example
<
/Link
>
<
/div
>
)
}
examples/with-turbopack/app/GlobalNav.tsx
View file @
ab42da06
...
...
@@ -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'
,
{
'text-zinc-400'
:
!
isActive
,
'text-white'
:
isActive
},
)
}
legacyBehavior
>
{
item
.
name
}
</
Link
>
...
...
examples/with-turbopack/app/page.tsx
View file @
ab42da06
...
...
@@ -25,6 +25,7 @@ export default function Page() {
href=
{
`/${item.slug}`
}
key=
{
item
.
name
}
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
>
...
...
examples/with-turbopack/ui/SectionLink.tsx
View file @
ab42da06
...
...
@@ -9,7 +9,7 @@ export const SectionLink = ({
href
:
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"
>
{
children
}
</
div
>
...
...
examples/with-turbopack/ui/TabNavItem.tsx
View file @
ab42da06
...
...
@@ -18,6 +18,7 @@ export const TabNavItem = ({
!
isActive
,
'bg-vercel-blue text-white'
:
isActive
,
})
}
legacyBehavior
>
{
children
}
</
Link
>
...
...
examples/with-typescript-graphql/pages/about.tsx
View file @
ab42da06
...
...
@@ -3,11 +3,7 @@ import Link from 'next/link'
export
default
function
About
()
{
return
(
<
div
>
Welcome to the about page. Go to the
{
' '
}
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
{
' '
}
page.
Welcome to the about page. Go to the
<
Link
href=
"/"
>
Home
</
Link
>
page.
</
div
>
)
}
examples/with-typescript-graphql/pages/index.tsx
View file @
ab42da06
...
...
@@ -63,10 +63,7 @@ const Index = () => {
return
viewer
?
(
<
div
>
You're signed in as
{
viewer
.
name
}
and you're
{
viewer
.
status
}
. Go to the
{
' '
}
<
Link
href=
"/about"
>
<
a
>
about
</
a
>
</
Link
>
{
' '
}
page.
<
Link
href=
"/about"
>
about
</
Link
>
page.
<
div
>
<
input
type=
"text"
...
...
examples/with-typescript/components/Layout.tsx
View file @
ab42da06
...
...
@@ -16,18 +16,9 @@ const Layout = ({ children, title = 'This is the default title' }: Props) => (
</
Head
>
<
header
>
<
nav
>
<
Link
href=
"/"
>
<
a
>
Home
</
a
>
</
Link
>
{
' '
}
|
{
' '
}
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
{
' '
}
|
{
' '
}
<
Link
href=
"/users"
>
<
a
>
Users List
</
a
>
</
Link
>
{
' '
}
|
<
a
href=
"/api/users"
>
Users API
</
a
>
<
Link
href=
"/"
>
Home
</
Link
>
|
<
Link
href=
"/about"
>
About
</
Link
>
|
{
' '
}
<
Link
href=
"/users"
>
Users List
</
Link
>
|
{
' '
}
<
a
href=
"/api/users"
>
Users API
</
a
>
</
nav
>
</
header
>
{
children
}
...
...
examples/with-typescript/components/ListItem.tsx
View file @
ab42da06
...
...
@@ -9,9 +9,7 @@ type Props = {
const
ListItem
=
({
data
}:
Props
)
=>
(
<
Link
href=
"/users/[id]"
as=
{
`/users/${data.id}`
}
>
<
a
>
{
data
.
id
}
:
{
data
.
name
}
</
a
>
{
data
.
id
}
:
{
data
.
name
}
</
Link
>
)
...
...
examples/with-typescript/pages/about.tsx
View file @
ab42da06
...
...
@@ -6,9 +6,7 @@ const AboutPage = () => (
<
h1
>
About
</
h1
>
<
p
>
This is the about page
</
p
>
<
p
>
<
Link
href=
"/"
>
<
a
>
Go home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go home
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-typescript/pages/index.tsx
View file @
ab42da06
...
...
@@ -5,9 +5,7 @@ const IndexPage = () => (
<
Layout
title=
"Home | Next.js + TypeScript Example"
>
<
h1
>
Hello Next.js 👋
</
h1
>
<
p
>
<
Link
href=
"/about"
>
<
a
>
About
</
a
>
</
Link
>
<
Link
href=
"/about"
>
About
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-typescript/pages/users/index.tsx
View file @
ab42da06
...
...
@@ -19,9 +19,7 @@ const WithStaticProps = ({ items }: Props) => (
<
p
>
You are currently on: /users
</
p
>
<
List
items=
{
items
}
/>
<
p
>
<
Link
href=
"/"
>
<
a
>
Go home
</
a
>
</
Link
>
<
Link
href=
"/"
>
Go home
</
Link
>
</
p
>
</
Layout
>
)
...
...
examples/with-unsplash/components/Collections/index.tsx
View file @
ab42da06
...
...
@@ -21,26 +21,24 @@ const Collections = ({ id_collection }: CollectionProps) => {
<
div
className=
{
styles
.
chips
}
>
{
data
.
map
(({
id
,
title
,
slug
})
=>
id_collection
?
(
<
Link
href=
"/"
key=
{
`collection_${slug}`
}
>
<
a
className=
{
styles
.
chip
}
>
{
title
}
<
Link
href=
"/"
>
<
button
type=
"button"
className=
{
styles
.
chip_remove
}
aria
-
label=
"Return to home"
></
button
>
</
Link
>
</
a
>
<
Link
href=
"/"
key=
{
`collection_${slug}`
}
className=
{
styles
.
chip
}
>
{
title
}
<
Link
href=
"/"
legacyBehavior
>
<
button
type=
"button"
className=
{
styles
.
chip_remove
}
aria
-
label=
"Return to home"
></
button
>
</
Link
>
</
Link
>
)
:
(
<
Link
href=
{
{
pathname
:
'/collection/[slug]'
,
query
:
{
id
:
id
}
}
}
as=
{
`/collection/${slug}?id=${id}`
}
key=
{
`collection_${slug}`
}
className=
{
styles
.
chip
}
>
<
a
className=
{
styles
.
chip
}
>
{
title
}
</
a
>
{
title
}
</
Link
>
)
)
}
...
...
examples/with-unsplash/components/User/index.tsx
View file @
ab42da06
...
...
@@ -12,20 +12,16 @@ const User = () => {
return
(
<
header
className=
{
styles
.
header
}
>
<
Link
href=
"/"
>
<
a
>
{
data
&&
(
<
img
src=
{
data
.
profile_image
.
large
}
className=
{
`${styles.headerImage} ${styles.borderCircle}`
}
alt=
{
data
.
name
}
/>
)
}
</
a
>
{
data
&&
(
<
img
src=
{
data
.
profile_image
.
large
}
className=
{
`${styles.headerImage} ${styles.borderCircle}`
}
alt=
{
data
.
name
}
/>
)
}
</
Link
>
<
h2
className=
{
styles
.
headingLg
}
>
<
Link
href=
"/"
>
<
a
>
{
data
?
data
.
name
:
''
}
</
a
>
</
Link
>
<
Link
href=
"/"
>
{
data
?
data
.
name
:
''
}
</
Link
>
</
h2
>
{
data
?
<
Social
user=
{
data
}
/>
:
''
}
...
...
examples/with-unstated/pages/about.js
View file @
ab42da06
...
...
@@ -9,9 +9,7 @@ export default function Index() {
<
CounterContainer
.
Provider
>
<
ClockContainer
.
Provider
>
<
div
>
<
Link
href
=
"/"
>
<
a
>
go
to
Index
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
go
to
Index
<
/Link
>
<
br
/>
<
br
/>
<
div
>
...
...
examples/with-unstated/pages/index.js
View file @
ab42da06
...
...
@@ -9,9 +9,7 @@ export default function Index() {
<
CounterContainer
.
Provider
>
<
ClockContainer
.
Provider
>
<
div
>
<
Link
href
=
"/about"
>
<
a
>
go
to
About
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
go
to
About
<
/Link
>
<
br
/>
<
br
/>
<
div
>
...
...
examples/with-urql/pages/index.js
View file @
ab42da06
...
...
@@ -7,10 +7,8 @@ export default function Home({ pokemons }) {
{
pokemons
.
map
((
pokemon
)
=>
(
<
li
key
=
{
pokemon
.
name
}
>
<
Link
as
=
{
`/pokemon/
${
pokemon
.
name
}
`
}
href
=
"/pokemon/[name]"
>
<
a
>
<
h2
style
=
{{
textTransform
:
'capitalize'
}}
>
{
pokemon
.
name
}
<
/h2
>
<
img
src
=
{
pokemon
.
image
}
alt
=
{
`
${
pokemon
.
name
}
picture`
}
/
>
<
/a
>
<
h2
style
=
{{
textTransform
:
'capitalize'
}}
>
{
pokemon
.
name
}
<
/h2
>
<
img
src
=
{
pokemon
.
image
}
alt
=
{
`
${
pokemon
.
name
}
picture`
}
/
>
<
/Link
>
<
/li
>
))}
...
...
examples/with-vercel-fetch/pages/index.js
View file @
ab42da06
...
...
@@ -5,9 +5,7 @@ export default function Index({ stars }) {
return
(
<
div
>
<
p
>
Next
.
js
has
{
stars
}
⭐️
<
/p
>
<
Link
href
=
"/preact"
>
<
a
>
How
about
preact
?
<
/a
>
<
/Link
>
<
Link
href
=
"/preact"
>
How
about
preact
?
<
/Link
>
<
/div
>
)
}
...
...
examples/with-vercel-fetch/pages/preact.js
View file @
ab42da06
...
...
@@ -5,9 +5,7 @@ export default function Preact({ stars }) {
return
(
<
div
>
<
p
>
Preact
has
{
stars
}
⭐
<
/p
>
<
Link
href
=
"/"
>
<
a
>
I
bet
Next
.
js
has
more
stars
(?)
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
I
bet
Next
.
js
has
more
stars
(?)
<
/Link
>
<
/div
>
)
}
...
...
examples/with-webassembly/pages/index.js
View file @
ab42da06
...
...
@@ -16,9 +16,7 @@ const Page = ({ router: { query } }) => {
return
(
<
div
>
<
RustComponent
number
=
{
number
}
/
>
<
Link
href
=
{
`/?number=
${
number
+
1
}
`
}
>
<
a
>+<
/a
>
<
/Link
>
<
Link
href
=
{
`/?number=
${
number
+
1
}
`
}
>+<
/Link
>
<
/div
>
)
}
...
...
examples/with-zones/blog/pages/index.js
View file @
ab42da06
...
...
@@ -7,14 +7,10 @@ export default function Blog() {
<
h3
>
This
is
our
blog
<
/h3
>
<
ul
>
<
li
>
<
Link
href
=
"/post/1"
>
<
a
>
Post
1
<
/a
>
<
/Link
>
<
Link
href
=
"/post/1"
>
Post
1
<
/Link
>
<
/li
>
<
li
>
<
Link
href
=
"/post/2"
>
<
a
>
Post
2
<
/a
>
<
/Link
>
<
Link
href
=
"/post/2"
>
Post
2
<
/Link
>
<
/li
>
<
/ul
>
<
a
href
=
"/"
>
Home
<
/a
>
...
...
examples/with-zones/blog/pages/post/[id].js
View file @
ab42da06
...
...
@@ -7,9 +7,7 @@ export default function Post() {
<
div
>
<
h3
>
Post
#
{
router
.
query
.
id
}
<
/h3
>
<
p
>
Lorem
ipsum
<
/p
>
<
Link
href
=
"/"
>
<
a
>
Back
to
blog
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Back
to
blog
<
/Link
>
<
/div
>
)
}
examples/with-zones/home/pages/about.js
View file @
ab42da06
...
...
@@ -4,9 +4,7 @@ const About = () => (
<
div
>
<
p
>
This
is
the
about
page
.
<
/p
>
<
div
>
<
Link
href
=
"/"
>
<
a
>
Go
Back
<
/a
>
<
/Link
>
<
Link
href
=
"/"
>
Go
Back
<
/Link
>
<
/div
>
<
img
width
=
{
200
}
src
=
"/static/vercel.png"
/>
<
/div
>
...
...
examples/with-zones/home/pages/index.js
View file @
ab42da06
...
...
@@ -13,9 +13,7 @@ export default function Home() {
<
a
href
=
"/blog"
>
Blog
<
/a
>
<
/div
>
<
div
>
<
Link
href
=
"/about"
>
<
a
>
About
us
<
/a
>
<
/Link
>
<
Link
href
=
"/about"
>
About
us
<
/Link
>
<
/div
>
<
Image
src
=
"/static/nextjs.png"
...
...
examples/with-zustand/components/nav.js
View file @
ab42da06
...
...
@@ -3,13 +3,13 @@ import Link from 'next/link'
const
Nav
=
()
=>
{
return
(
<
nav
>
<
Link
href
=
"/"
>
<
Link
href
=
"/"
legacyBehavior
>
<
a
>
Index
<
/a
>
<
/Link
>
<
Link
href
=
"/ssg"
>
<
Link
href
=
"/ssg"
legacyBehavior
>
<
a
>
SSG
<
/a
>
<
/Link
>
<
Link
href
=
"/ssr"
>
<
Link
href
=
"/ssr"
legacyBehavior
>
<
a
>
SSR
<
/a
>
<
/Link
>
<
style
jsx
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment