From b5e51e8172048f8ea0302cd2ac7d245f0f3fced9 Mon Sep 17 00:00:00 2001 From: Wooseong Kim Date: Sat, 2 Sep 2023 01:15:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat(article):=20article=20=ED=85=9C?= =?UTF-8?q?=ED=94=8C=EB=A6=BF=EC=9D=84=20=EA=B8=B0=EB=B0=98=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20ArticlePage=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/react-world/src/pages/article.tsx | 206 +++++++++++++++++++++++++ templates/article.html | 173 --------------------- 2 files changed, 206 insertions(+), 173 deletions(-) create mode 100644 apps/react-world/src/pages/article.tsx delete mode 100644 templates/article.html diff --git a/apps/react-world/src/pages/article.tsx b/apps/react-world/src/pages/article.tsx new file mode 100644 index 00000000..9147c951 --- /dev/null +++ b/apps/react-world/src/pages/article.tsx @@ -0,0 +1,206 @@ +import { useParams } from 'react-router-dom'; + +export const ArticlePage = () => { + const { articleSlug } = useParams<{ articleSlug: string }>(); + + console.log('articleSlug: ' + articleSlug); + + return ( + <> + + +
+
+
+

How to build webapps that scale

+ +
+ + + +
+ + Eric Simons + + January 20th +
+ +    + + + +
+
+
+ +
+
+
+

+ Web development technologies have evolved at an incredible clip + over the past few years. +

+

Introducing RealWorld.

+

+ It's a great solution for learning how other frameworks + work. +

+
    +
  • realworld
  • +
  • + implementations +
  • +
+
+
+ +
+ +
+
+ + + +
+ + Eric Simons + + January 20th +
+ +   + + + +
+
+ +
+
+
+
+ +
+
+ + +
+
+ +
+
+

+ With supporting text below as a natural lead-in to + additional content. +

+
+
+ + + +   + + Jacob Schmidt + + Dec 29th +
+
+ +
+
+

+ With supporting text below as a natural lead-in to + additional content. +

+
+
+ + + +   + + Jacob Schmidt + + Dec 29th + + + +
+
+
+
+
+
+ + + + ); +}; diff --git a/templates/article.html b/templates/article.html deleted file mode 100644 index 888cd2e9..00000000 --- a/templates/article.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - Conduit - - - - -
- - -
-
-
-

- Web development technologies have evolved at an incredible clip over the past few years. -

-

Introducing RealWorld.

-

It's a great solution for learning how other frameworks work.

-
    -
  • realworld
  • -
  • implementations
  • -
-
-
- -
- -
- -
- -
-
-
-
- -
- -
- -
-
-

- With supporting text below as a natural lead-in to additional content. -

-
- -
- -
-
-

- With supporting text below as a natural lead-in to additional content. -

-
- -
-
-
-
-
- - - - \ No newline at end of file From 9fcfc8ee0c651f38dd470619c6c8f2ff5efa1284 Mon Sep 17 00:00:00 2001 From: Wooseong Kim Date: Sat, 2 Sep 2023 01:16:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat(app):=20Routes=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?/article=20Path=20=EB=A5=BC=20ArticlePage=20=EB=A1=9C=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/react-world/src/routes/Routes.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/react-world/src/routes/Routes.tsx b/apps/react-world/src/routes/Routes.tsx index 63193ab6..940f806e 100644 --- a/apps/react-world/src/routes/Routes.tsx +++ b/apps/react-world/src/routes/Routes.tsx @@ -2,6 +2,7 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom'; import { HomePage } from '../pages/home'; import { LoginPage } from '../pages/login'; import { RegisterPage } from '../pages/register'; +import { ArticlePage } from '../pages/article'; const router = createBrowserRouter([ { @@ -16,6 +17,10 @@ const router = createBrowserRouter([ path: '/register', element: , }, + { + path: '/article/:articleSlug', + element: , + }, ]); export const Routes = () => {