Skip to content

Commit 3f0414c

Browse files
committed
Merge branch 'dev' of https://github.com/MBTips/FE-MBTips into fix/select-info의-30대-이상-버튼-값
2 parents e1649de + 5461404 commit 3f0414c

19 files changed

+446
-10
lines changed

public/icon/restart.svg

Lines changed: 3 additions & 0 deletions
Loading

public/image/ENTP.png

-6.59 KB
Loading

public/image/Rectangle.png

5.95 KB
Loading

public/image/mbti_test.png

4.6 KB
Loading
4.04 KB
Loading

src/App.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import ChatTemporature from "@/pages/ChatTemporature";
88
import Content from "@/pages/Content";
99
import Login from "@/pages/Login";
1010
import KaKaoLogin from "@/pages/KaKaoLogin";
11+
import MbtiTestIntro from "@/pages/MbtiTestIntro";
12+
import MbtiTestQuestions from "@/pages/MbtiTestQuestions";
13+
import MbtiTestResult from "@/pages/MbtiTestResult";
1114
import CenteredLayout from "./components/CenteredLayout";
1215

1316
const App = () => {
@@ -23,8 +26,11 @@ const App = () => {
2326
<Route path="/chat-temporature" element={<ChatTemporature />} />
2427
<Route path="/contents/:id" element={<Content />} />
2528
<Route path="/login" element={<Login />} />
26-
<Route path="/kakao-login" element={<KaKaoLogin />} />{" "}
27-
</Routes>
29+
<Route path="/kakao-login" element={<KaKaoLogin />} />
30+
<Route path="/mbti-test" element={<MbtiTestIntro />} />
31+
<Route path="/mbti-test/:n" element={<MbtiTestQuestions />} />
32+
<Route path="/mbti-test-result/:mbti" element={<MbtiTestResult />} />
33+
</Routes>
2834
</CenteredLayout>
2935
</Router>
3036
);

src/components/StrokeBanner.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1+
import { useNavigate } from "react-router-dom";
2+
13
const StrokeBanner = () => {
4+
const navigate = useNavigate();
5+
6+
const handleNavigate = () => {
7+
const mode = "virtualFriend";
8+
navigate("/select-info", { state: mode });
9+
};
10+
211
return (
312
<div className="flex h-[178px] w-[320px] flex-col justify-center rounded-lg border border-dashed border-gray-200 px-[38px] py-6 text-center md:w-[335px] lg:w-[460px]">
4-
{/* "상대방 정보 선택" 페이지 생성되면되면 Link로 쓸 예정*/}
5-
<a href="/setting-friends">
13+
<button onClick={handleNavigate}>
614
<img
715
src="/icon/plus_button.svg"
816
alt="친구 등록 버튼"
917
className="mx-auto hover:scale-110"
1018
width={40}
1119
height={40}
1220
/>
13-
</a>
21+
</button>
1422
<strong className="text-4 mt-4 font-bold text-gray-900">
1523
친구 정보를 저장하고 대화할 수 있어요
1624
</strong>

src/components/SubTitle.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => {
1414
}
1515
};
1616

17+
const handleNavigate = () => {
18+
const mode = "virtualFriend";
19+
navigate("/select-info", { state: mode });
20+
};
21+
1722
return (
1823
<div className="flex items-center">
1924
<h2 className="text-xl font-bold text-gray-900">
@@ -23,7 +28,7 @@ const SubTitle = ({ mode }: { mode: "빠른대화" | "친구목록" }) => {
2328
{titleList[mode].description}
2429
</p>
2530
{mode === "친구목록" && (
26-
<button onClick={() => navigate("/setting-friends")}>
31+
<button onClick={handleNavigate}>
2732
<img
2833
src="/icon/plus.svg"
2934
alt="친구 추가 버튼"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const MbtiAnswerButtons = ({ content }: { content: string[] }) => {
2+
3+
const commonStyle = "flex justify-center items-center bg-primary-pale border-1 border-primary-light rounded-lg w-[335px] h-[80px] font-medium text-primary-normal text-lg";
4+
5+
return (
6+
<div className="flex flex-col gap-9">
7+
<button className={commonStyle}>
8+
{content[0]}
9+
</button>
10+
<button className={commonStyle}>
11+
{content[1]}
12+
</button>
13+
</div>
14+
)
15+
}
16+
17+
export default MbtiAnswerButtons;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { useNavigate } from "react-router-dom";
2+
3+
const RestartButton = () => {
4+
const navigate = useNavigate();
5+
6+
const goFirstStep = () => {
7+
navigate("/mbti-test");
8+
}
9+
10+
return (
11+
<button className="flex justify-center items-center bg-gray-100 rounded-lg w-[72px] h-[60px]" onClick={goFirstStep}>
12+
<img src="/icon/restart.svg" alt="다시하기 버튼" width={24} height={24} />
13+
</button>
14+
)
15+
}
16+
17+
export default RestartButton;

0 commit comments

Comments
 (0)