diff --git a/docs/advanced-features/codemods.md b/docs/advanced-features/codemods.md index 0a8b146b5cf286..512872ed3ea778 100644 --- a/docs/advanced-features/codemods.md +++ b/docs/advanced-features/codemods.md @@ -19,6 +19,30 @@ Codemods are transformations that run on your codebase programmatically. This al ## Next.js 13 +### `new-link` + +Safely removes `` from `next/link` or adds `legacyBehavior` prop. + +For example: + +```jsx +export default function Page() { + return ( + + About Us + + ) +} +``` + +Transforms into: + +```jsx +export default function Page() { + return About Us +} +``` + ### `next-image-to-legacy-image` Safely migrates existing Next.js 10, 11, 12 applications importing `next/image` to the renamed `next/legacy/image` import in Next.js 13. diff --git a/docs/advanced-features/i18n-routing.md b/docs/advanced-features/i18n-routing.md index c4ed2f39e00676..0e0ddf9cc30949 100644 --- a/docs/advanced-features/i18n-routing.md +++ b/docs/advanced-features/i18n-routing.md @@ -233,7 +233,7 @@ import Link from 'next/link' export default function IndexPage(props) { return ( - To /fr/another + To /fr/another ) } @@ -279,7 +279,7 @@ import Link from 'next/link' export default function IndexPage(props) { return ( - To /fr/another + To /fr/another ) } diff --git a/docs/api-reference/next.config.js/basepath.md b/docs/api-reference/next.config.js/basepath.md index 0df919b35a0575..696120ba4c662c 100644 --- a/docs/api-reference/next.config.js/basepath.md +++ b/docs/api-reference/next.config.js/basepath.md @@ -35,9 +35,7 @@ For example, using `/about` will automatically become `/docs/about` when `basePa export default function HomePage() { return ( <> - - About Page - + About Page ) } diff --git a/docs/api-reference/next/link.md b/docs/api-reference/next/link.md index fa3a74405accdb..c8261e651f20b3 100644 --- a/docs/api-reference/next/link.md +++ b/docs/api-reference/next/link.md @@ -31,19 +31,13 @@ function Home() { return ( ) @@ -56,6 +50,7 @@ export default Home - `href` - The path or URL to navigate to. This is the only required prop. It can also be an object, see [example here](/docs/api-reference/next/link.md#with-url-object) - `as` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes). +- [`legacyBehavior`](#if-the-child-is-a-tag) - Changes behavior so that child must be ``. Defaults to `false`. - [`passHref`](#if-the-child-is-a-custom-component-that-wraps-an-a-tag) - Forces `Link` to send the `href` property to its child. Defaults to `false` - `prefetch` - Prefetch the page in the background. Defaults to `true`. Any `` that is in the viewport (initially or through scroll) will be preloaded. Prefetch can be disabled by passing `prefetch={false}`. When `prefetch` is set to `false`, prefetching will still occur on hover. Pages using [Static Generation](/docs/basic-features/data-fetching/get-static-props.md) will preload `JSON` files with the data for faster page transitions. Prefetching is only enabled in production. - [`replace`](#replace-the-url-instead-of-push) - Replace the current `history` state instead of adding a new url into the stack. Defaults to `false` @@ -78,7 +73,7 @@ function Posts({ posts }) { {posts.map((post) => (
  • - {post.title} + {post.title}
  • ))} @@ -89,6 +84,22 @@ function Posts({ posts }) { export default Posts ``` +## If the child is `` tag + +```jsx +import Link from 'next/link' + +function Legacy() { + return ( + + About Us + + ) +} + +export default Legacy +``` + ## If the child is a custom component that wraps an `` tag If the child of `Link` is a custom component that wraps an `` tag, you must add `passHref` to `Link`. This is necessary if you’re using libraries like [styled-components](https://styled-components.com/). Without this, the `` tag will not have the `href` attribute, which hurts your site's accessibility and might affect SEO. If you're using [ESLint](/docs/basic-features/eslint.md#eslint-plugin), there is a built-in rule `next/link-passhref` to ensure correct usage of `passHref`. @@ -103,9 +114,8 @@ const RedLink = styled.a` ` function NavLink({ href, name }) { - // Must add passHref to Link return ( - + {name} ) @@ -119,7 +129,7 @@ export default NavLink ## If the child is a functional component -If the child of `Link` is a functional component, in addition to using `passHref`, you must wrap the component in [`React.forwardRef`](https://reactjs.org/docs/react-api.html#reactforwardref): +If the child of `Link` is a functional component, in addition to using `passHref` and `legacyBehavior`, you must wrap the component in [`React.forwardRef`](https://reactjs.org/docs/react-api.html#reactforwardref): ```jsx import Link from 'next/link' @@ -136,7 +146,7 @@ const MyButton = React.forwardRef(({ onClick, href }, ref) => { function Home() { return ( - + ) @@ -162,7 +172,7 @@ function Home() { query: { name: 'test' }, }} > - About us + About us
  • @@ -172,7 +182,7 @@ function Home() { query: { slug: 'my-post' }, }} > - Blog Post + Blog Post
  • @@ -195,7 +205,7 @@ The default behavior of the `Link` component is to `push` a new URL into the `hi ```jsx - About us + About us ``` @@ -205,6 +215,6 @@ The default behavior of `Link` is to scroll to the top of the page. When there i ```jsx - Disables scrolling to the top + Disables scrolling to the top ``` diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index e068a85e479acc..c108f9f60aee59 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -156,11 +156,7 @@ export default function Page(props) {

    Page: {router.query.slug}

    Count: {count}

    - - one - - two - + one two ) } diff --git a/docs/migrating/from-gatsby.md b/docs/migrating/from-gatsby.md index d8388b283c75f5..98031267bc2ffb 100644 --- a/docs/migrating/from-gatsby.md +++ b/docs/migrating/from-gatsby.md @@ -78,15 +78,11 @@ export default function Home() { import Link from 'next/link' export default function Home() { - return ( - - blog - - ) + return blog } ``` -Update any import statements, switch `to` to `href`, and add an `` tag as a child of the element. +Update any import statements, switch `to` to `href`. ## Data Fetching diff --git a/docs/migrating/from-react-router.md b/docs/migrating/from-react-router.md index a81482f5e1ec3d..1174eaa5ed3c9a 100644 --- a/docs/migrating/from-react-router.md +++ b/docs/migrating/from-react-router.md @@ -34,7 +34,7 @@ import Link from 'next/link' export default function App() { return ( - About + About ) } diff --git a/docs/routing/dynamic-routes.md b/docs/routing/dynamic-routes.md index 9f0b7f66517f4b..87c02e856791de 100644 --- a/docs/routing/dynamic-routes.md +++ b/docs/routing/dynamic-routes.md @@ -63,18 +63,14 @@ function Home() { return ( diff --git a/docs/routing/introduction.md b/docs/routing/introduction.md index c2b8c8ddc8cd6d..4fb506cbf7fa7b 100644 --- a/docs/routing/introduction.md +++ b/docs/routing/introduction.md @@ -47,19 +47,13 @@ function Home() { return ( ) @@ -89,7 +83,7 @@ function Posts({ posts }) { {posts.map((post) => (
  • - {post.title} + {post.title}
  • ))} @@ -118,7 +112,7 @@ function Posts({ posts }) { query: { slug: post.slug }, }} > - {post.title} + {post.title} ))} diff --git a/docs/testing.md b/docs/testing.md index 3906a4e87e57c6..7dca84b8879af9 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -66,9 +66,7 @@ import Link from 'next/link' export default function Home() { return ( ) } @@ -183,9 +181,7 @@ import Link from 'next/link' export default function Home() { return ( ) } diff --git a/docs/upgrading.md b/docs/upgrading.md index b03728b76f4def..7c087383990b28 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -11,6 +11,8 @@ The minimum Node.js version has been bumped from 12.22.0 to 14.0.0, since 12.x h The `next/image` import was renamed to `next/legacy/image`. The `next/future/image` import was renamed to `next/image`. A [codemod is available](/docs/advanced-features/codemods.md#next-image-to-legacy-image) to safely and automatically rename your imports. +The `next/link` child can no longer be ``. Add the `legacyBehavior` prop to use the legacy behavior or remove the `` to upgrade. A [codemod is available](/docs/advanced-features/codemods.md#new-link) to automatically upgrade your code. + ## Upgrading to 12.2 If you were using Middleware prior to `12.2`, please see the [upgrade guide](https://nextjs.org/docs/messages/middleware-upgrade-guide) for more information. diff --git a/packages/next/build/jest/jest.ts b/packages/next/build/jest/jest.ts index be176de4f091f2..ef17dc10a18984 100644 --- a/packages/next/build/jest/jest.ts +++ b/packages/next/build/jest/jest.ts @@ -1,7 +1,7 @@ import { loadEnvConfig } from '@next/env' import { resolve, join } from 'path' import loadConfig from '../../server/config' -import { NextConfigComplete } from '../../server/config-shared' +import type { NextConfigComplete } from '../../server/config-shared' import { PHASE_TEST } from '../../shared/lib/constants' import loadJsConfig from '../load-jsconfig' import * as Log from '../output/log' diff --git a/packages/next/server/config-shared.ts b/packages/next/server/config-shared.ts index 09e41c61db6e43..6286da3da52852 100644 --- a/packages/next/server/config-shared.ts +++ b/packages/next/server/config-shared.ts @@ -556,8 +556,7 @@ export const defaultConfig: NextConfig = { // TODO: change default in next major release (current v12.1.5) legacyBrowsers: true, browsersListForSwc: false, - // TODO: change default in next major release (current v12.1.5) - newNextLinkBehavior: false, + newNextLinkBehavior: true, cpus: Math.max( 1, (Number(process.env.CIRCLE_NODE_TOTAL) || diff --git a/test/development/basic-basepath/hmr/pages/hmr/index.js b/test/development/basic-basepath/hmr/pages/hmr/index.js index 01557c87ae63fb..f33384547b4660 100644 --- a/test/development/basic-basepath/hmr/pages/hmr/index.js +++ b/test/development/basic-basepath/hmr/pages/hmr/index.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default () => (
    - - Bad Page + + Bad Page
    ) diff --git a/test/development/basic-basepath/misc/pages/development-logs/index.js b/test/development/basic-basepath/misc/pages/development-logs/index.js index ee339f890e917c..d5470bd7ac3e01 100644 --- a/test/development/basic-basepath/misc/pages/development-logs/index.js +++ b/test/development/basic-basepath/misc/pages/development-logs/index.js @@ -4,7 +4,7 @@ export default function IndexPage() { return (
    - To About Page + To About Page
    ) diff --git a/test/development/basic-basepath/misc/pages/development-logs/link-with-no-prefetch.js b/test/development/basic-basepath/misc/pages/development-logs/link-with-no-prefetch.js index 1c3e4882dc6bfa..d2b8088442fe90 100644 --- a/test/development/basic-basepath/misc/pages/development-logs/link-with-no-prefetch.js +++ b/test/development/basic-basepath/misc/pages/development-logs/link-with-no-prefetch.js @@ -3,9 +3,7 @@ import Link from 'next/link' export default function NoPrefetchPage() { return (
    - - No prefetch - + No prefetch
    ) } diff --git a/test/development/basic-basepath/misc/pages/development-logs/link-with-prefetch-false.js b/test/development/basic-basepath/misc/pages/development-logs/link-with-prefetch-false.js index 272796e78d1665..dfd977fe27083c 100644 --- a/test/development/basic-basepath/misc/pages/development-logs/link-with-prefetch-false.js +++ b/test/development/basic-basepath/misc/pages/development-logs/link-with-prefetch-false.js @@ -4,7 +4,7 @@ export default function PrefetchFalsePage() { return (
    - Prefetch set to false + Prefetch set to false
    ) diff --git a/test/development/basic-basepath/next-dynamic/pages/dynamic/index.js b/test/development/basic-basepath/next-dynamic/pages/dynamic/index.js index f41eae2a5804fa..c3311057c2d5a2 100644 --- a/test/development/basic-basepath/next-dynamic/pages/dynamic/index.js +++ b/test/development/basic-basepath/next-dynamic/pages/dynamic/index.js @@ -2,8 +2,6 @@ import Link from 'next/link' export default () => (
    - - No Chunk - + No Chunk
    ) diff --git a/test/development/basic/hmr/pages/hmr/index.js b/test/development/basic/hmr/pages/hmr/index.js index 01557c87ae63fb..f33384547b4660 100644 --- a/test/development/basic/hmr/pages/hmr/index.js +++ b/test/development/basic/hmr/pages/hmr/index.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default () => (
    - - Bad Page + + Bad Page
    ) diff --git a/test/development/basic/misc/pages/development-logs/index.js b/test/development/basic/misc/pages/development-logs/index.js index ee339f890e917c..d5470bd7ac3e01 100644 --- a/test/development/basic/misc/pages/development-logs/index.js +++ b/test/development/basic/misc/pages/development-logs/index.js @@ -4,7 +4,7 @@ export default function IndexPage() { return (
    - To About Page + To About Page
    ) diff --git a/test/development/basic/misc/pages/development-logs/link-with-no-prefetch.js b/test/development/basic/misc/pages/development-logs/link-with-no-prefetch.js index 1c3e4882dc6bfa..d2b8088442fe90 100644 --- a/test/development/basic/misc/pages/development-logs/link-with-no-prefetch.js +++ b/test/development/basic/misc/pages/development-logs/link-with-no-prefetch.js @@ -3,9 +3,7 @@ import Link from 'next/link' export default function NoPrefetchPage() { return (
    - - No prefetch - + No prefetch
    ) } diff --git a/test/development/basic/misc/pages/development-logs/link-with-prefetch-false.js b/test/development/basic/misc/pages/development-logs/link-with-prefetch-false.js index 272796e78d1665..dfd977fe27083c 100644 --- a/test/development/basic/misc/pages/development-logs/link-with-prefetch-false.js +++ b/test/development/basic/misc/pages/development-logs/link-with-prefetch-false.js @@ -4,7 +4,7 @@ export default function PrefetchFalsePage() { return (
    - Prefetch set to false + Prefetch set to false
    ) diff --git a/test/development/basic/next-dynamic/pages/dynamic/index.js b/test/development/basic/next-dynamic/pages/dynamic/index.js index f41eae2a5804fa..c3311057c2d5a2 100644 --- a/test/development/basic/next-dynamic/pages/dynamic/index.js +++ b/test/development/basic/next-dynamic/pages/dynamic/index.js @@ -2,8 +2,6 @@ import Link from 'next/link' export default () => (
    - - No Chunk - + No Chunk
    ) diff --git a/test/e2e/app-dir/app-prefetch/app/page.js b/test/e2e/app-dir/app-prefetch/app/page.js index be3690c6321beb..7cf985c66b7934 100644 --- a/test/e2e/app-dir/app-prefetch/app/page.js +++ b/test/e2e/app-dir/app-prefetch/app/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function HomePage() { return ( <> - - To Dashboard + + To Dashboard ) diff --git a/test/e2e/app-dir/app-static/app/blog/[author]/page.js b/test/e2e/app-dir/app-static/app/blog/[author]/page.js index c8e2e05c45033d..cbdefb1dd8837f 100644 --- a/test/e2e/app-dir/app-static/app/blog/[author]/page.js +++ b/test/e2e/app-dir/app-static/app/blog/[author]/page.js @@ -10,34 +10,34 @@ export default function Page({ params }) {

    /blog/[author]

    {JSON.stringify(params)}

    {Date.now()}

    - - /blog/tim + + /blog/tim
    - - /blog/seb + + /blog/seb
    - - /blog/styfle + + /blog/styfle
    - - /blog/tim/first-post + + /blog/tim/first-post
    - - /blog/seb/second-post + + /blog/seb/second-post
    - - /blog/styfle/first-post + + /blog/styfle/first-post
    - - /dynamic-no-gen-params/first + + /dynamic-no-gen-params/first
    diff --git a/test/e2e/app-dir/app-static/app/dynamic-no-gen-params/[slug]/page.js b/test/e2e/app-dir/app-static/app/dynamic-no-gen-params/[slug]/page.js index 27b661a09fdca8..7b7ee8e7806b68 100644 --- a/test/e2e/app-dir/app-static/app/dynamic-no-gen-params/[slug]/page.js +++ b/test/e2e/app-dir/app-static/app/dynamic-no-gen-params/[slug]/page.js @@ -6,13 +6,13 @@ export default function Page({ params }) {

    /dynamic-no-gen-params

    {JSON.stringify(params)}

    - - /dynamic-no-gen-params/second + + /dynamic-no-gen-params/second
    - - /blog/styfle + + /blog/styfle
    diff --git a/test/e2e/app-dir/app/app/catch-all-link/page.js b/test/e2e/app-dir/app/app/catch-all-link/page.js index 59157f985f1e7a..1170d49fa5d2d0 100644 --- a/test/e2e/app-dir/app/app/catch-all-link/page.js +++ b/test/e2e/app-dir/app/app/catch-all-link/page.js @@ -4,13 +4,16 @@ export default function Page() { return ( <>
    - - To catch-all + + To catch-all
    - - To optional catch-all + + To optional catch-all
    diff --git a/test/e2e/app-dir/app/app/internal/page.js b/test/e2e/app-dir/app/app/internal/page.js index ddbc93ea558543..525104c574ac8f 100644 --- a/test/e2e/app-dir/app/app/internal/page.js +++ b/test/e2e/app-dir/app/app/internal/page.js @@ -4,13 +4,13 @@ export default function Page() { return (
    - - Navigate Rewrite + + Navigate Rewrite
    - - Navigate Redirect + + Navigate Redirect
    diff --git a/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js index c440f0582c337e..0ce09bfa6ab7ea 100644 --- a/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js +++ b/test/e2e/app-dir/app/app/link-hard-push/[id]/page.js @@ -6,8 +6,8 @@ export default function Page({ params }) { return ( <>

    {nanoid()}

    {' '} - - To {other} + + To{other} ) diff --git a/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js b/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js index c90e93f74c78d0..6f69c10520d125 100644 --- a/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js +++ b/test/e2e/app-dir/app/app/link-hard-replace/[id]/page.js @@ -6,8 +6,8 @@ export default function Page({ params }) { return ( <>

    {nanoid()}

    {' '} - - To {other} + + To{other} ) diff --git a/test/e2e/app-dir/app/app/link-hard-replace/page.js b/test/e2e/app-dir/app/app/link-hard-replace/page.js index 340baa107e373c..0f099a798f596f 100644 --- a/test/e2e/app-dir/app/app/link-hard-replace/page.js +++ b/test/e2e/app-dir/app/app/link-hard-replace/page.js @@ -5,11 +5,11 @@ export default function Page() { return ( <>

    {nanoid()}

    - - Self Link + + Self Link - - Subpage + + Subpage ) diff --git a/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js index cd586543ab752e..ecb43519aa8b33 100644 --- a/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js +++ b/test/e2e/app-dir/app/app/link-hard-replace/subpage/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page() { return ( - - Self Link + + Self Link ) } diff --git a/test/e2e/app-dir/app/app/link-soft-push/page.js b/test/e2e/app-dir/app/app/link-soft-push/page.js index 049e5be9c49c77..a83690e8b51070 100644 --- a/test/e2e/app-dir/app/app/link-soft-push/page.js +++ b/test/e2e/app-dir/app/app/link-soft-push/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page() { return ( - - With ID + + With ID ) } diff --git a/test/e2e/app-dir/app/app/link-soft-replace/page.js b/test/e2e/app-dir/app/app/link-soft-replace/page.js index c65758d99076cf..26a535bb1a78a6 100644 --- a/test/e2e/app-dir/app/app/link-soft-replace/page.js +++ b/test/e2e/app-dir/app/app/link-soft-replace/page.js @@ -5,11 +5,11 @@ export default function Page() { return ( <>

    {nanoid()}

    - - Self Link + + Self Link - - Subpage + + Subpage ) diff --git a/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js b/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js index 6ee17de0650898..b1fe8890da7603 100644 --- a/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js +++ b/test/e2e/app-dir/app/app/link-soft-replace/subpage/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page() { return ( - - Self Link + + Self Link ) } diff --git a/test/e2e/app-dir/app/app/link-with-as/page.js b/test/e2e/app-dir/app/app/link-with-as/page.js index 12a33746cc9fe4..8e3eff7d0c16d5 100644 --- a/test/e2e/app-dir/app/app/link-with-as/page.js +++ b/test/e2e/app-dir/app/app/link-with-as/page.js @@ -6,8 +6,9 @@ export default function Page() { - To info 123 + To info 123 ) diff --git a/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js index 3e1cbf3dd95ddf..3e74c679f93290 100644 --- a/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js +++ b/test/e2e/app-dir/app/app/nested-navigation/TabNavItem.js @@ -2,8 +2,8 @@ import Link from 'next/link' export const TabNavItem = ({ children, href }) => { return ( - - {children} + + {children} ) } diff --git a/test/e2e/app-dir/app/app/pages-linking/page.js b/test/e2e/app-dir/app/app/pages-linking/page.js index 19b7cc4b861b8a..d32b739de990e8 100644 --- a/test/e2e/app-dir/app/app/pages-linking/page.js +++ b/test/e2e/app-dir/app/app/pages-linking/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page(props) { return ( - - To Pages Page + + To Pages Page ) } diff --git a/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js index 95038b8326dcdf..b2f96fb405b404 100644 --- a/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js +++ b/test/e2e/app-dir/app/app/redirect/next-config-redirect/page.js @@ -3,8 +3,8 @@ import Link from 'next/link' export default function Page() { return ( <> - - To Dashboard through /redirect/a + + To Dashboard through /redirect/a ) diff --git a/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js b/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js index 49a721599e253b..7323ef64adb965 100644 --- a/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js +++ b/test/e2e/app-dir/app/app/redirect/next-middleware-redirect/page.js @@ -3,8 +3,8 @@ import Link from 'next/link' export default function Page() { return ( <> - - To Dashboard through /redirect/a + + To Dashboard through /redirect/a ) diff --git a/test/e2e/app-dir/app/app/rewrites/page.js b/test/e2e/app-dir/app/app/rewrites/page.js index ae97d2af2cbd4b..eeae4be1361c4b 100644 --- a/test/e2e/app-dir/app/app/rewrites/page.js +++ b/test/e2e/app-dir/app/app/rewrites/page.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page() { return ( - - To Dashboard Rewritten + + To Dashboard Rewritten ) } diff --git a/test/e2e/app-dir/app/app/same-layout/first/page.js b/test/e2e/app-dir/app/app/same-layout/first/page.js index bf4ba9e2455b91..2c2ebede77b4d9 100644 --- a/test/e2e/app-dir/app/app/same-layout/first/page.js +++ b/test/e2e/app-dir/app/app/same-layout/first/page.js @@ -4,8 +4,8 @@ export default function Page() { return ( <>

    hello from same-layout/first

    - - To Second + + To Second ) diff --git a/test/e2e/app-dir/app/app/same-layout/second/page.js b/test/e2e/app-dir/app/app/same-layout/second/page.js index 9d981dcb708aa6..9eefb7df26093d 100644 --- a/test/e2e/app-dir/app/app/same-layout/second/page.js +++ b/test/e2e/app-dir/app/app/same-layout/second/page.js @@ -4,8 +4,8 @@ export default function Page() { return ( <>

    hello from same-layout/second

    - - To First + + To First ) diff --git a/test/e2e/app-dir/app/app/template/clientcomponent/other/page.js b/test/e2e/app-dir/app/app/template/clientcomponent/other/page.js index 24c81bb71930df..dc90e11c70e5fe 100644 --- a/test/e2e/app-dir/app/app/template/clientcomponent/other/page.js +++ b/test/e2e/app-dir/app/app/template/clientcomponent/other/page.js @@ -3,8 +3,8 @@ export default function Page() { return ( <>

    Other Page

    - - To Page + + To Page ) diff --git a/test/e2e/app-dir/app/app/template/clientcomponent/page.js b/test/e2e/app-dir/app/app/template/clientcomponent/page.js index 89378c7e29f176..4c9988bb9b33bf 100644 --- a/test/e2e/app-dir/app/app/template/clientcomponent/page.js +++ b/test/e2e/app-dir/app/app/template/clientcomponent/page.js @@ -4,8 +4,8 @@ export default function Page() { return ( <>

    Page

    - - To Other + + To Other ) diff --git a/test/e2e/app-dir/app/app/template/servercomponent/other/page.js b/test/e2e/app-dir/app/app/template/servercomponent/other/page.js index 2ed3a0fa15cef9..b9892154b6d4e8 100644 --- a/test/e2e/app-dir/app/app/template/servercomponent/other/page.js +++ b/test/e2e/app-dir/app/app/template/servercomponent/other/page.js @@ -3,8 +3,8 @@ export default function Page() { return ( <>

    Other Page

    - - To Page + + To Page ) diff --git a/test/e2e/app-dir/app/app/template/servercomponent/page.js b/test/e2e/app-dir/app/app/template/servercomponent/page.js index 27a7097ccd650c..bb83fba1ea7faa 100644 --- a/test/e2e/app-dir/app/app/template/servercomponent/page.js +++ b/test/e2e/app-dir/app/app/template/servercomponent/page.js @@ -4,8 +4,8 @@ export default function Page() { return ( <>

    Page

    - - To Other + + To Other ) diff --git a/test/e2e/app-dir/app/app/with-id/page.js b/test/e2e/app-dir/app/app/with-id/page.js index 07beecc4203fa3..afaab4d7d4aa01 100644 --- a/test/e2e/app-dir/app/app/with-id/page.js +++ b/test/e2e/app-dir/app/app/with-id/page.js @@ -5,8 +5,8 @@ export default function Page() { return ( <>

    {nanoid()}

    - - To Navigation + + To Navigation ) diff --git a/test/e2e/app-dir/app/pages/app-linking.js b/test/e2e/app-dir/app/pages/app-linking.js index 0a8e0289afe47e..3ef5245032ae91 100644 --- a/test/e2e/app-dir/app/pages/app-linking.js +++ b/test/e2e/app-dir/app/pages/app-linking.js @@ -2,8 +2,8 @@ import Link from 'next/link' export default function Page(props) { return ( - - To App Page + + To App Page ) } diff --git a/test/e2e/app-dir/app/pages/link-to-rewritten-path.js b/test/e2e/app-dir/app/pages/link-to-rewritten-path.js index 177f41aa73e336..ed212bfb085928 100644 --- a/test/e2e/app-dir/app/pages/link-to-rewritten-path.js +++ b/test/e2e/app-dir/app/pages/link-to-rewritten-path.js @@ -3,8 +3,8 @@ import Link from 'next/link' export default function Page(props) { return ( <> - - Exists but not routed + + Exists but not routed ) diff --git a/test/e2e/app-dir/asset-prefix/app/page.js b/test/e2e/app-dir/asset-prefix/app/page.js index f02fd1b341b1c4..c00ce2fb17b1ad 100644 --- a/test/e2e/app-dir/asset-prefix/app/page.js +++ b/test/e2e/app-dir/asset-prefix/app/page.js @@ -3,8 +3,8 @@ export default function HomePage() { return ( <>

    - - To a with trailing slash + + To a with trailing slash

    diff --git a/test/e2e/app-dir/rsc-basic/app/next-api/link/page.js b/test/e2e/app-dir/rsc-basic/app/next-api/link/page.js index 13a9616be5e617..6f6893b2c31def 100644 --- a/test/e2e/app-dir/rsc-basic/app/next-api/link/page.js +++ b/test/e2e/app-dir/rsc-basic/app/next-api/link/page.js @@ -8,8 +8,8 @@ export default function LinkPage({ searchParams }) { <>

    query:{id}

    - - next id + + next id