From eae5c81d27e63cf0776d8b95c4c66b9ad6eeb84f Mon Sep 17 00:00:00 2001 From: lcp0578 Date: Tue, 23 Jul 2024 18:44:42 +0800 Subject: [PATCH] update Chapter07/basic-linking/src/Second.tsx & add-article-component/src/MyFeature.jsx swap article-item-component/src/MyFeature.jsx & update AddArticle.jsx section -> header --- .../add-article-component/src/AddArticle.jsx | 4 ++-- .../add-article-component/src/MyFeature.jsx | 19 +++++++++---------- .../article-item-component/src/MyFeature.jsx | 19 ++++++++++--------- Chapter07/basic-linking/src/Second.tsx | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Chapter05/add-article-component/src/AddArticle.jsx b/Chapter05/add-article-component/src/AddArticle.jsx index 63ce0d5..d65f652 100644 --- a/Chapter05/add-article-component/src/AddArticle.jsx +++ b/Chapter05/add-article-component/src/AddArticle.jsx @@ -7,12 +7,12 @@ function AddArticle({ onClickAdd, }) { return ( -
+

{name}

-
+ ); } diff --git a/Chapter05/add-article-component/src/MyFeature.jsx b/Chapter05/add-article-component/src/MyFeature.jsx index 0b531d4..a86bb51 100644 --- a/Chapter05/add-article-component/src/MyFeature.jsx +++ b/Chapter05/add-article-component/src/MyFeature.jsx @@ -1,5 +1,6 @@ import * as React from "react"; import ArticleList from "./ArticleList"; +import AddArticle from "./AddArticle"; const id = (function* () { let i = 1; @@ -55,16 +56,14 @@ function MyFeature() { return (
-
-

Articles

- - - -
+
); diff --git a/Chapter05/article-item-component/src/MyFeature.jsx b/Chapter05/article-item-component/src/MyFeature.jsx index a86bb51..0b531d4 100644 --- a/Chapter05/article-item-component/src/MyFeature.jsx +++ b/Chapter05/article-item-component/src/MyFeature.jsx @@ -1,6 +1,5 @@ import * as React from "react"; import ArticleList from "./ArticleList"; -import AddArticle from "./AddArticle"; const id = (function* () { let i = 1; @@ -56,14 +55,16 @@ function MyFeature() { return (
- +
+

Articles

+ + + +
); diff --git a/Chapter07/basic-linking/src/Second.tsx b/Chapter07/basic-linking/src/Second.tsx index 9fee78e..33d0158 100644 --- a/Chapter07/basic-linking/src/Second.tsx +++ b/Chapter07/basic-linking/src/Second.tsx @@ -1,5 +1,5 @@ -function First() { +function Second() { return

Second

; } -export default First; +export default Second;