From c2f4a5c5e7ad9672e037707bd6dd2a2ab742ffd3 Mon Sep 17 00:00:00 2001 From: leedasom050115 Date: Thu, 29 May 2025 17:29:40 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=BC=EC=A0=9C=EC=A0=9C=EC=B6=9C=ED=95=A9?= =?UTF-8?q?=EB=8B=88=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ColorPage.jsx | 16 ++++++++++++++-- src/components/MainPage.jsx | 27 ++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/components/ColorPage.jsx b/src/components/ColorPage.jsx index bcabeb9..823bade 100644 --- a/src/components/ColorPage.jsx +++ b/src/components/ColorPage.jsx @@ -1,11 +1,23 @@ import { useParams } from 'react-router-dom'; import '../styles/ColorPage.css'; +} /> function ColorPage() { return ( -
- 배경 페이지입니다 +
+ 배경 페이지입니다 : {id}
); } diff --git a/src/components/MainPage.jsx b/src/components/MainPage.jsx index 540d1b2..9630397 100644 --- a/src/components/MainPage.jsx +++ b/src/components/MainPage.jsx @@ -1,14 +1,35 @@ import { useNavigate } from 'react-router-dom'; import '../styles/MainPage.css'; -const Mainpage = () => { - +const colors = ["red", "blue", "pink", "orange", "yellow"]; + +const MainPage = () => { + const navigate = useNavigate(); + return (

React 색상 선택


+ {colors.map((color) => ( + + ))} +
); }; -export default Mainpage; +export default MainPage;