From bd97c01fca49f3d66cd2dc82e5da0742a3237d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Fern=C3=A1ndez?= Date: Sat, 10 Jun 2023 20:55:27 +0200 Subject: [PATCH] docs: remove added verb and fix good to know section. (#51054) --- docs/02-app/02-api-reference/01-components/link.mdx | 2 +- .../02-api-reference/04-functions/revalidatePath.mdx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/02-app/02-api-reference/01-components/link.mdx b/docs/02-app/02-api-reference/01-components/link.mdx index 74c05175e0e3e..2ecc3f347f783 100644 --- a/docs/02-app/02-api-reference/01-components/link.mdx +++ b/docs/02-app/02-api-reference/01-components/link.mdx @@ -370,7 +370,7 @@ The default behavior of `Link` is to scroll to the top of the page. When there i It's common to use [Middleware](/docs/app/building-your-application/routing/middleware) for authentication or other purposes that involve rewriting the user to a different page. In order for the `` component to properly prefetch links with rewrites via Middleware, you need to tell Next.js both the URL to display and the URL to prefetch. This is required to avoid un-necessary fetches to middleware to know the correct route to prefetch. -For example, if you have want to serve a `/dashboard` route that has authenticated and visitor views, you may add something similar to the following in your Middleware to redirect the user to the correct page: +For example, if you want to serve a `/dashboard` route that has authenticated and visitor views, you may add something similar to the following in your Middleware to redirect the user to the correct page: ```js filename="middleware.js" export function middleware(req) { diff --git a/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx b/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx index 082d5d74ef3bc..52dd6206c4686 100644 --- a/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx +++ b/docs/02-app/02-api-reference/04-functions/revalidatePath.mdx @@ -27,11 +27,11 @@ export async function GET(request) { } ``` -**Good to know:** - -- `revalidatePath` is available in both [Node.js and Edge runtimes](/docs/pages/building-your-application/rendering/edge-and-nodejs-runtimes). -- `revalidatePath` will revalidate _all segments_ under a dynamic route segment. For example, if you have a dynamic segment `/product/[id]` and you call `revalidatePath('/product/[id]')`, then all segments under `/product/[id]` will be revalidated as requested. -- `revalidatePath` only invalidates the cache when the path is next visited. This means calling `revalidatePath` with a dynamic route segment will not immediately trigger many revalidations at once. The invalidation only happens when the path is next visited. +> **Good to know:** +> +> - `revalidatePath` is available in both [Node.js and Edge runtimes](/docs/pages/building-your-application/rendering/edge-and-nodejs-runtimes). +> - `revalidatePath` will revalidate _all segments_ under a dynamic route segment. For example, if you have a dynamic segment `/product/[id]` and you call `revalidatePath('/product/[id]')`, then all segments under `/product/[id]` will be revalidated as requested. +> - `revalidatePath` only invalidates the cache when the path is next visited. This means calling `revalidatePath` with a dynamic route segment will not immediately trigger many revalidations at once. The invalidation only happens when the path is next visited. ## Parameters