From 19d72a13b902d6d7098706c9d34121298f87298a Mon Sep 17 00:00:00 2001 From: LeeJunhyeok03 Date: Fri, 16 Feb 2024 03:10:17 +0900 Subject: [PATCH] feat: add Setting --- src/pages/Home.tsx | 27 +++--- src/pages/Setting.tsx | 22 +++++ src/pages/component/Comment.tsx | 8 +- src/pages/component/Comments.tsx | 3 +- src/pages/component/Feel.tsx | 4 +- src/pages/component/Header.tsx | 154 +++++++++++++++---------------- src/pages/component/Transfer.tsx | 10 ++ src/routes/Router.tsx | 2 + 8 files changed, 130 insertions(+), 100 deletions(-) create mode 100644 src/pages/Setting.tsx diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 59439be..069271f 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -4,19 +4,20 @@ import Menu from './component/Menu'; import BannerSlider from './component/BannerSlider'; import NowReviews from './component/NowReviews'; import CategoryMenu from './component/CategoryMenu'; +import SearchMenu from './component/SearchMenu'; export default function Home() { - return ( -
-
-
- -
- -
- - -
- ); + return ( +
+
+ +
+ +
+ +
+ + +
+ ); } - diff --git a/src/pages/Setting.tsx b/src/pages/Setting.tsx new file mode 100644 index 0000000..7c8396e --- /dev/null +++ b/src/pages/Setting.tsx @@ -0,0 +1,22 @@ +import React, { useState } from 'react'; +import { Link } from 'react-router-dom'; +import Header from './component/Header'; + +type SettingPrors = { + text: string; + nextUrl?: string; + icon?: string; +}; + +const Setting: React.FC = ({ text, nextUrl, icon }) => { + return ( +
+
+ + {text} + +
+ ); +}; + +export default Setting; diff --git a/src/pages/component/Comment.tsx b/src/pages/component/Comment.tsx index 9858581..a9a1acb 100644 --- a/src/pages/component/Comment.tsx +++ b/src/pages/component/Comment.tsx @@ -2,10 +2,10 @@ import React, { useState } from 'react'; import { Link } from 'react-router-dom'; type CommentPrors = { - text: String; - name: String; - img: String; - id: String; + text: string; + name: string; + img: string; + id: string; }; const Comment: React.FC = ({ text, name, img, id }) => { diff --git a/src/pages/component/Comments.tsx b/src/pages/component/Comments.tsx index 2e7bb5e..5e91944 100644 --- a/src/pages/component/Comments.tsx +++ b/src/pages/component/Comments.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import Comment from './Comment'; +import Teansfer from './Transfer'; const Comments: React.FC = () => { return ( @@ -37,7 +38,7 @@ const Comments: React.FC = () => { id="1234" img="img" /> -
+ ); diff --git a/src/pages/component/Feel.tsx b/src/pages/component/Feel.tsx index 0eeba47..b15036c 100644 --- a/src/pages/component/Feel.tsx +++ b/src/pages/component/Feel.tsx @@ -3,8 +3,8 @@ import Good from '../../assets/Good.png'; import Bad from '../../assets/Bad.png'; type FeelProps = { - BadReview: String[]; - GoodReview: String[]; + BadReview: string[]; + GoodReview: string[]; }; const Feel: React.FC = ({ BadReview, GoodReview }) => { diff --git a/src/pages/component/Header.tsx b/src/pages/component/Header.tsx index 3bd2063..c9c7f91 100644 --- a/src/pages/component/Header.tsx +++ b/src/pages/component/Header.tsx @@ -1,14 +1,12 @@ import React from 'react'; import { Link, useNavigate } from 'react-router-dom'; import alarmSrc from '../../assets/alarm.png'; -import SearchMenu from './SearchMenu'; type HeaderProps = { text?: string; back?: boolean; alarm?: boolean; review?: boolean; - search?: boolean; setting?: boolean; className?: string; border?: boolean; @@ -20,7 +18,6 @@ const Header: React.FC = ({ back, alarm, review, - search, className, setting, border, @@ -33,84 +30,81 @@ const Header: React.FC = ({ }; return ( -
-
-
- {back && ( - - )} -
-
- {text ? ( -

{text}

- ) : ( - - back - - )} -
-
- {alarm && ( - - back - - )} - {review && ( - - back - - )} - {setting && ( - - back - - )} -
+
+
+ {back && ( + + )} +
+
+ {text ? ( +

{text}

+ ) : ( + + back + + )} +
+
+ {alarm && ( + + back + + )} + {review && ( + + back + + )} + {setting && ( + + back + + )}
- {search && }
); }; diff --git a/src/pages/component/Transfer.tsx b/src/pages/component/Transfer.tsx index e69de29..cb73777 100644 --- a/src/pages/component/Transfer.tsx +++ b/src/pages/component/Transfer.tsx @@ -0,0 +1,10 @@ +import React, { useState } from 'react'; +import { Link } from 'react-router-dom'; + +const Teansfer: React.FC = () => { + return ( +
+ ); +}; + +export default Teansfer; diff --git a/src/routes/Router.tsx b/src/routes/Router.tsx index ed4b6d1..ae5cfd6 100644 --- a/src/routes/Router.tsx +++ b/src/routes/Router.tsx @@ -8,6 +8,7 @@ import SearchPerson from '../pages/SearchPerson'; import SearchPlace from '../pages/SearchPlace'; import Store from '../pages/Store'; import Videos from '../pages/Videos'; +import Setting from '../pages/Setting'; import { useAuth } from '../api/auth'; const Router = () => { @@ -23,6 +24,7 @@ const Router = () => { } /> } /> } /> + } /> } /> ) : (