Skip to content

Commit 993269f

Browse files
committed
chore: merge conflict 에러 해결
2 parents 8e94943 + f519a00 commit 993269f

17 files changed

+793
-523
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>MBTips</title>
6+
<title>MBTips_MBTI AI 대화 시뮬레이션</title>
77
</head>
88
<body>
99
<div id="root"></div>

package-lock.json

Lines changed: 42 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"react": "^18.3.1",
1818
"react-dom": "^18.3.1",
1919
"react-ga4": "^2.1.0",
20+
"react-helmet": "^6.1.0",
2021
"react-router-dom": "^7.1.5",
2122
"tailwindcss": "^4.0.3",
2223
"zustand": "^5.0.3"
@@ -27,6 +28,7 @@
2728
"@types/node": "^22.13.13",
2829
"@types/react": "^18.3.18",
2930
"@types/react-dom": "^18.3.5",
31+
"@types/react-helmet": "^6.1.11",
3032
"@vitejs/plugin-react": "^4.3.4",
3133
"eslint": "^9.19.0",
3234
"eslint-config-prettier": "^10.0.1",

public/image/og_image.png

3.48 MB
Loading

src/App.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useLocation
77
} from "react-router-dom";
88
import { initGA, trackPageView } from "@/libs/analytics";
9+
import { Helmet } from "react-helmet";
910
import Home from "@/pages/Home";
1011
import SelectInfo from "@/pages/SelectInfo";
1112
import Chat from "@/pages/Chat";
@@ -102,6 +103,18 @@ const App = () => {
102103
onClose={() => setToastMessage("")}
103104
/>
104105
)}
106+
107+
<Helmet>
108+
<meta property="og:title" content="MBTips_MBTI AI 대화 시뮬레이션" />
109+
<meta property="og:image" content="%PUBLIC_URL%/image/og_image.png" />
110+
<meta name="twitter:card" content="summary_large_image" />
111+
<meta name="twitter:title" content="MBTips_MBTI AI 대화 시뮬레이션" />
112+
<meta
113+
property="twitter:image"
114+
content="%PUBLIC_URL%/image/og_image.png"
115+
/>
116+
</Helmet>
117+
105118
<Routes>
106119
<Route path="/" element={<Home />} />
107120
<Route path="/select-info" element={<SelectInfo />} />
@@ -118,7 +131,7 @@ const App = () => {
118131
<Route path="/kakao-login" element={<KaKaoLogin />} />
119132
<Route path="/mbti-test" element={<MbtiTestIntro />} />
120133
<Route path="/mbti-test-progress" element={<MbtiTestQuestions />} />
121-
<Route path="/mbti-test-result" element={<MbtiTestResult />} />
134+
<Route path="/mbti-test-result/:mbti" element={<MbtiTestResult />} />
122135
<Route path="*" element={<Error statusCode="500" />} />
123136
</Routes>
124137
</CenteredLayout>

src/pages/Chat.tsx

Lines changed: 51 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { useEffect, useRef, useState, ChangeEvent, KeyboardEvent } from "react";
22
import { useLocation } from "react-router-dom";
3+
import { Helmet } from "react-helmet";
4+
import { authInstance } from "@/api/axios";
5+
import { trackEvent } from "@/libs/analytics";
36
import IntroGuide from "@/components/IntroGuide";
47
import Header from "@/components/header/Header";
58
import ChatMessage from "@/components/ChatMessage";
69
import ChatActionBar from "@/components/ChatActionBar";
710
import TipsMenuContainer from "@/components/tips/TipsMenuContainer";
811
import pickMbtiImage from "@/utils/pickMbtiImage";
9-
import { authInstance } from "@/api/axios";
10-
import { trackEvent } from "@/libs/analytics";
1112

1213
interface Message {
1314
role: "user" | "assistant";
@@ -135,49 +136,57 @@ const Chat = () => {
135136
};
136137

137138
return (
138-
<div className="flex h-screen w-full flex-col bg-white lg:w-[500px]">
139-
<Header title={chatTitle} />
140-
141-
<div className="flex-1 space-y-4 overflow-y-auto px-[20px] pt-6">
142-
<IntroGuide />
143-
{/* 메시지 리스트 */}
144-
{messages.map((msg, idx) => (
145-
<div
146-
key={idx}
147-
className={`flex ${msg.role === "user" ? "justify-end" : "justify-start"} items-start`}
148-
>
149-
{/* 캐릭터 아이콘 */}
150-
{msg.role === "assistant" && (
151-
<img
152-
src={assistantImgUrl}
153-
alt="MBTI ICON"
154-
className="mr-[9px] h-[36px] w-[36px] shrink-0 rounded-full border border-gray-200 object-cover"
155-
/>
156-
)}
157-
{/* 채팅 메시지 */}
158-
<div className="mt-3.5">
159-
<ChatMessage
160-
message={msg.content}
161-
myMessage={msg.role === "user"}
162-
/>
139+
<>
140+
<Helmet>
141+
<meta name="description" content={`${mbti}와의 대화창`} />
142+
<meta property="og:description" content={`${mbti}와의 대화창`} />
143+
<meta property="twitter:description" content={`${mbti}와의 대화창`} />
144+
</Helmet>
145+
146+
<div className="flex h-screen w-[360px] flex-col bg-white md:w-[375px] lg:w-[500px]">
147+
<Header title={chatTitle} showShareIcon={false} />
148+
149+
<div className="flex-1 space-y-4 overflow-y-auto px-[20px] pt-6">
150+
<IntroGuide />
151+
{/* 메시지 리스트 */}
152+
{messages.map((msg, idx) => (
153+
<div
154+
key={idx}
155+
className={`flex ${msg.role === "user" ? "justify-end" : "justify-start"} items-start`}
156+
>
157+
{/* 캐릭터 아이콘 */}
158+
{msg.role === "assistant" && (
159+
<img
160+
src={assistantImgUrl}
161+
alt="MBTI ICON"
162+
className="mr-[9px] h-[36px] w-[36px] shrink-0 rounded-full border border-gray-200 object-cover"
163+
/>
164+
)}
165+
{/* 채팅 메시지 */}
166+
<div className="mt-3.5">
167+
<ChatMessage
168+
message={msg.content}
169+
myMessage={msg.role === "user"}
170+
/>
171+
</div>
163172
</div>
164-
</div>
165-
))}
173+
))}
166174

167-
<div ref={bottomRef} />
168-
</div>
175+
<div ref={bottomRef} />
176+
</div>
177+
178+
<ChatActionBar
179+
isOpen={isOpen}
180+
setIsOpen={handleToggleTips}
181+
value={input}
182+
onChange={handleChange}
183+
onKeyUp={handleKeyup}
184+
onSend={() => handleSend(input)}
185+
/>
169186

170-
<ChatActionBar
171-
isOpen={isOpen}
172-
setIsOpen={handleToggleTips}
173-
value={input}
174-
onChange={handleChange}
175-
onKeyUp={handleKeyup}
176-
onSend={() => handleSend(input)}
177-
/>
178-
179-
{isOpen && <TipsMenuContainer conversationId={id} mbti={mbti} />}
180-
</div>
187+
{isOpen && <TipsMenuContainer conversationId={id} mbti={mbti} />}
188+
</div>
189+
</>
181190
);
182191
};
183192

src/pages/ChatRecommend.tsx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useParams } from "react-router-dom";
2+
import { Helmet } from "react-helmet";
23
import { Mbti } from "@/types/mbti";
34
import { chatRecommend } from "@/mock/chatRecommend";
45
import Header from "@/components/header/Header";
@@ -18,22 +19,30 @@ const ChatRecommend = () => {
1819
} else return <Error statusCode="404" />;
1920

2021
return (
21-
<div>
22-
<Header
23-
title="대화 주제 추천"
24-
showPreviousIcon={true}
25-
showShareIcon={true}
26-
/>
27-
<main className="mx-auto flex h-screen flex-col px-5 py-6">
28-
<img
29-
src={mbtiImage}
30-
alt="mbti 이미지"
31-
className="h-auto w-full rounded-2xl"
22+
<>
23+
<Helmet>
24+
<meta name="description" content="대화 주제 추천" />
25+
<meta property="og:description" content="대화 주제 추천" />
26+
<meta property="twitter:description" content="대화 주제 추천" />
27+
</Helmet>
28+
29+
<div>
30+
<Header
31+
title="대화 주제 추천"
32+
showPreviousIcon={true}
33+
showShareIcon={true}
3234
/>
33-
<h1 className="mt-9 text-xl font-bold">{title}</h1>
34-
<span className="mt-6 whitespace-pre-wrap">{description}</span>
35-
</main>
36-
</div>
35+
<main className="mx-auto flex h-screen flex-col px-5 py-6">
36+
<img
37+
src={mbtiImage}
38+
alt="mbti 이미지"
39+
className="h-auto w-full rounded-2xl"
40+
/>
41+
<h1 className="mt-9 text-xl font-bold">{title}</h1>
42+
<span className="mt-6 whitespace-pre-wrap">{description}</span>
43+
</main>
44+
</div>
45+
</>
3746
);
3847
};
3948

0 commit comments

Comments
 (0)