From 16e90b80d785f9dff683019cbd4e1b25cd8f4327 Mon Sep 17 00:00:00 2001 From: Ricky Date: Tue, 7 Jan 2025 09:34:21 -0500 Subject: [PATCH 1/5] bot to notify for PRs (#7408) --- .github/workflows/discord_notify.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/discord_notify.yml diff --git a/.github/workflows/discord_notify.yml b/.github/workflows/discord_notify.yml new file mode 100644 index 000000000..ff2caa1bf --- /dev/null +++ b/.github/workflows/discord_notify.yml @@ -0,0 +1,21 @@ +name: Discord Notify + +on: + pull_request_target: + types: [ labeled ] + +jobs: + notify: + if: ${{ github.event.label.name == 'React Core Team' }} + runs-on: ubuntu-latest + steps: + - name: Discord Webhook Action + uses: tsickert/discord-webhook@v6.0.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} + embed-author-name: ${{ github.event.pull_request.user.login }} + embed-author-url: ${{ github.event.pull_request.user.html_url }} + embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }} + embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}' + embed-description: ${{ github.event.pull_request.body }} + embed-url: ${{ github.event.pull_request.html_url }} \ No newline at end of file From 54e95e10ec5f341e4c111f44794b0a1ccfbe90f9 Mon Sep 17 00:00:00 2001 From: Amarachi Ugwu <49257104+amarachiugwu@users.noreply.github.com> Date: Thu, 9 Jan 2025 07:20:15 +0100 Subject: [PATCH 2/5] Fix broken Next.js base path configuration link (#7419) --- src/content/learn/add-react-to-an-existing-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/add-react-to-an-existing-project.md b/src/content/learn/add-react-to-an-existing-project.md index 4b7098bd6..35cf0b81c 100644 --- a/src/content/learn/add-react-to-an-existing-project.md +++ b/src/content/learn/add-react-to-an-existing-project.md @@ -21,7 +21,7 @@ title: 將 React 加入到一個現有的專案 以下是我們推薦的設定方式: 1. 使用其中一個[基於 React 的框架]((/learn/start-a-new-react-project))來**建構你的應用程式中的 React 部分**。 -2. 在你的框架設定中將 **`/some-app` 指定為 *基本路徑***(這裡是如何設定:[Next.js](https://nextjs.org/docs/api-reference/next.config.js/basepath)、[Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/))。 +2. 在你的框架設定中將 **`/some-app` 指定為 *基本路徑***(這裡是如何設定:[Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath)、[Gatsby](https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/path-prefix/))。 3. **設定你的伺服器或代理**,讓所有在 `/some-app/` 下的請求都由 React 應用程式處理。 這可以確保你的應用程式中 React 部分能夠[受益於這些框架所內建的最佳實踐](/learn/start-a-new-react-project#can-i-use-react-without-a-framework)。 From 3dd66509279efea18235c6a1c0014d57160ca4aa Mon Sep 17 00:00:00 2001 From: Hichem Fantar Date: Thu, 9 Jan 2025 07:32:35 +0100 Subject: [PATCH 3/5] fix: change overflow-x-scroll to overflow-x-auto in TerminalBlock component (#7415) --- src/components/MDX/TerminalBlock.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MDX/TerminalBlock.tsx b/src/components/MDX/TerminalBlock.tsx index fc13af338..7d95a6532 100644 --- a/src/components/MDX/TerminalBlock.tsx +++ b/src/components/MDX/TerminalBlock.tsx @@ -71,7 +71,7 @@ function TerminalBlock({level = 'info', children}: TerminalBlockProps) {
From 91968a3c8e6ab90c092df9d32c44db136d94e1ab Mon Sep 17 00:00:00 2001 From: Azzyxec Date: Thu, 9 Jan 2025 12:05:12 +0530 Subject: [PATCH 4/5] Update server-functions.md (#7396) In the section "Importing Server Functions from Client Components" updated "createNoteAction" to "createNote" to match the function name in the example --- src/content/reference/rsc/server-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/reference/rsc/server-functions.md b/src/content/reference/rsc/server-functions.md index 74aab615c..b079e322e 100644 --- a/src/content/reference/rsc/server-functions.md +++ b/src/content/reference/rsc/server-functions.md @@ -82,7 +82,7 @@ export async function createNote() { ``` -When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNoteAction` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNoteAction` function using the reference provided: +When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNote` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNote` function using the reference provided: ```js [[1, 2, "createNote"], [1, 5, "createNote"], [1, 7, "createNote"]] "use client"; @@ -90,7 +90,7 @@ import {createNote} from './actions'; function EmptyNote() { console.log(createNote); - // {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNoteAction'} + // {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNote'}