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