From a55a1e2a857eaf592eefde7479dae576ad8170b0 Mon Sep 17 00:00:00 2001 From: baegofda Date: Fri, 30 Jun 2023 23:59:47 +0900 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20redirect.mdx=20=EB=B2=88=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02-api-reference/04-functions/redirect.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/02-app/02-api-reference/04-functions/redirect.mdx b/docs/02-app/02-api-reference/04-functions/redirect.mdx index d345a1f5a..de47e7e44 100644 --- a/docs/02-app/02-api-reference/04-functions/redirect.mdx +++ b/docs/02-app/02-api-reference/04-functions/redirect.mdx @@ -1,13 +1,13 @@ --- title: redirect -description: API Reference for the redirect function. +description: 'redirect' 함수에 대한 API 렌퍼런스입니다. --- -The `redirect` function allows you to redirect the user to another URL. If you need to redirect to a 404, you can use the [`notFound` function](/docs/app/api-reference/functions/not-found). +`redirect` 함수는 사용자를 다른 URL로 리다이렉션 시킬 수 있습니다. 404페이지로 리다이렉션해야 하는 경우 [`notFound` 함수](/docs/app/api-reference/functions/not-found)를 사용할 수 있습니다. ## `redirect()` -Invoking the `redirect()` function throws a `NEXT_REDIRECT` error and terminates rendering of the route segment in which it was thrown. `redirect()` can be called with a relative or an absolute URL. +`redirect()` 함수를 호출하면 `NEXT_REDIRECT` 에러가 발생하고 에러가 발생한 경로 세그먼트의 렌더링이 종료됩니다. `redirect()` 함수는 상대 혹은 절대 경로를 사용하여 호출할 수 있습니다. ```jsx filename="app/team/[id]/page.js" import { redirect } from 'next/navigation' @@ -28,8 +28,8 @@ export default async function Profile({ params }) { } ``` -> **Good to know**: `redirect()` does not require you to use `return redirect()` due to using the TypeScript [`never`](https://www.typescriptlang.org/docs/handbook/2/functions.html#never) type. +> **알아두면 좋은 점**: `redirect()`는 타입스크립트의 [`never`](https://www.typescriptlang.org/docs/handbook/2/functions.html#never) 타입을 사용하기 때문에 `return redirect()`로 사용할 필요가 없습니다. -| Version | Changes | -| --------- | ---------------------- | -| `v13.0.0` | `notFound` introduced. | +| 버전 | 변경사항 | +| --------- | --------------- | +| `v13.0.0` | `notFound` 안내 | From 794e0abae6f0e061a73faa115c5325c86230b089 Mon Sep 17 00:00:00 2001 From: baegofda_ <65588499+baegofda@users.noreply.github.com> Date: Thu, 20 Jul 2023 16:07:59 +0900 Subject: [PATCH 2/3] Update docs/02-app/02-api-reference/04-functions/redirect.mdx Co-authored-by: JiHee Han <57996351+g2hhh2ee@users.noreply.github.com> --- docs/02-app/02-api-reference/04-functions/redirect.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/02-api-reference/04-functions/redirect.mdx b/docs/02-app/02-api-reference/04-functions/redirect.mdx index de47e7e44..7ea696242 100644 --- a/docs/02-app/02-api-reference/04-functions/redirect.mdx +++ b/docs/02-app/02-api-reference/04-functions/redirect.mdx @@ -28,7 +28,7 @@ export default async function Profile({ params }) { } ``` -> **알아두면 좋은 점**: `redirect()`는 타입스크립트의 [`never`](https://www.typescriptlang.org/docs/handbook/2/functions.html#never) 타입을 사용하기 때문에 `return redirect()`로 사용할 필요가 없습니다. +> **참고**: `redirect()`는 타입스크립트의 [`never`](https://www.typescriptlang.org/docs/handbook/2/functions.html#never) 타입을 사용하기 때문에 `return redirect()`로 사용할 필요가 없습니다. | 버전 | 변경사항 | | --------- | --------------- | From fea329867956e4adaaf08d44a4f3570e4265b4af Mon Sep 17 00:00:00 2001 From: baegofda Date: Thu, 20 Jul 2023 16:23:55 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20description=20redirect=20=EC=9B=8C?= =?UTF-8?q?=EB=94=A9=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/02-app/02-api-reference/04-functions/redirect.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/02-api-reference/04-functions/redirect.mdx b/docs/02-app/02-api-reference/04-functions/redirect.mdx index 7ea696242..84faa092e 100644 --- a/docs/02-app/02-api-reference/04-functions/redirect.mdx +++ b/docs/02-app/02-api-reference/04-functions/redirect.mdx @@ -1,6 +1,6 @@ --- title: redirect -description: 'redirect' 함수에 대한 API 렌퍼런스입니다. +description: 리다이렉트 함수에 대한 API 렌퍼런스입니다. --- `redirect` 함수는 사용자를 다른 URL로 리다이렉션 시킬 수 있습니다. 404페이지로 리다이렉션해야 하는 경우 [`notFound` 함수](/docs/app/api-reference/functions/not-found)를 사용할 수 있습니다.