Skip to content

Commit ca13e10

Browse files
authored
Merge pull request #274 from MBTips/dev
18차 배포
2 parents f350c75 + ef5f699 commit ca13e10

23 files changed

+159
-179
lines changed

src/App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,15 @@ const App = () => {
106106

107107
<Helmet>
108108
<meta property="og:title" content="MBTips_MBTI AI 대화 시뮬레이션" />
109-
<meta property="og:image" content="%PUBLIC_URL%/image/og_image.png" />
109+
<meta
110+
property="og:image"
111+
content={`${import.meta.env.VITE_API_BASE_URL}image/og_image.png`}
112+
/>
110113
<meta name="twitter:card" content="summary_large_image" />
111114
<meta name="twitter:title" content="MBTips_MBTI AI 대화 시뮬레이션" />
112115
<meta
113116
property="twitter:image"
114-
content="%PUBLIC_URL%/image/og_image.png"
117+
content={`${import.meta.env.VITE_API_BASE_URL}image/og_image.png`}
115118
/>
116119
</Helmet>
117120

src/components/Banner.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const Banner = () => {
4545
}, []);
4646

4747
return (
48-
<div className="relative flex h-[184px] w-full">
48+
<div className="relative h-[184px] w-screen max-w-[500px]">
4949
<Link
5050
to={order === 0 ? "/mbti-test" : `/contents/${order}`}
5151
className="absolute h-full w-full"
@@ -67,11 +67,11 @@ const Banner = () => {
6767
)}
6868
>
6969
<source media="(min-width: 500px)" srcSet={image.lg} />
70-
<source media="(min-width: 375px)" srcSet={image.md} />
70+
<source media="(min-width: 375px)" srcSet={image.sm} />
7171
<img
7272
src={image.sm}
7373
alt={image.description}
74-
className="h-full w-full object-cover"
74+
className="h-full w-full"
7575
/>
7676
</picture>
7777
))}

src/components/CenteredLayout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ interface CenteredLayoutProps {
66

77
const CenteredLayout = ({ children }: CenteredLayoutProps) => (
88
<div className="flex min-h-screen w-screen justify-center bg-gray-50">
9-
<div className="flex w-full justify-center bg-gray-50">{children}</div>
9+
<div className="flex w-full flex-col bg-white lg:w-[500px] ">
10+
{children}
11+
</div>
1012
</div>
1113
);
1214

src/components/ChatActionBar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ChangeEvent, KeyboardEvent } from "react";
22
import ToggleChatTipsButton from "@/components/button/ToggleChatTipsButton";
33
import MessageInput from "@/components/input/MessageInput";
4-
import TipsMenuContainer from "@/components/tips/TipsMenuContainer";
54

65
interface ChatActionProps {
76
isOpen: boolean;
@@ -21,7 +20,7 @@ const ChatActionBar = ({
2120
onSend
2221
}: ChatActionProps) => {
2322
return (
24-
<div className="flex h-[68px] w-full items-center justify-center border-t border-gray-100 bg-white">
23+
<section className="flex h-[68px] w-full items-center justify-center border-t border-gray-100 bg-white">
2524
<ToggleChatTipsButton isOpen={isOpen} setIsOpen={setIsOpen} />
2625
<MessageInput value={value} onChange={onChange} onKeyUp={onKeyUp} />
2726
<img
@@ -32,7 +31,7 @@ const ChatActionBar = ({
3231
width={40}
3332
height={40}
3433
/>
35-
</div>
34+
</section>
3635
);
3736
};
3837

src/components/button/ChatStartButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ChatStartButton = ({ mode, mbti }: ChatStartButtonProps) => {
3939
};
4040
return (
4141
<button
42-
className="flex h-[56px] w-[320px] items-center justify-center rounded-lg bg-primary-normal font-bold text-white md:w-[335px] lg:w-[460px]"
42+
className="flex h-[56px] w-full items-center justify-center rounded-lg bg-primary-normal font-bold text-white lg:w-[460px]"
4343
onClick={handleNavigate}
4444
>
4545
대화 시작하기

src/components/button/LoginButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const LoginButton = () => {
77

88
return (
99
<a href="/login" onClick={handleClick}>
10-
<button className="h-[36px] w-[69px] rounded-lg border-[0.8px] border-gray-300 text-md font-bold text-gray-600">
10+
<button className="mr-5 h-[36px] w-[69px] rounded-lg border-[0.8px] border-gray-300 text-md font-bold text-gray-600">
1111
로그인
1212
</button>
1313
</a>

src/components/header/Header.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ReactNode } from "react";
21
import { useLocation } from "react-router-dom";
32
import SubHeader from "@/components/header/SubHeader";
43
import MainHeader from "@/components/header/MainHeader";
@@ -8,22 +7,20 @@ type HeaderProps = {
87
title?: string;
98
showPreviousIcon?: boolean;
109
showShareIcon?: boolean;
11-
children?: ReactNode;
1210
};
1311

1412
const Header = ({
1513
title = "",
1614
showPreviousIcon = true,
17-
showShareIcon = true,
18-
children
15+
showShareIcon = true
1916
}: HeaderProps) => {
2017
const { pathname } = useLocation();
2118
const { isLoggedIn } = useAuthStore();
2219
const isHomepage = pathname === "/";
2320

2421
return (
2522
<>
26-
<div className="fixed z-50 w-[360px] bg-white md:w-[375px] lg:w-[500px]">
23+
<header className="fixed top-0 z-50 w-full bg-white lg:w-[500px]">
2724
{isHomepage ? (
2825
<MainHeader isLoggedIn={isLoggedIn} />
2926
) : (
@@ -33,9 +30,7 @@ const Header = ({
3330
showShareIcon={showShareIcon}
3431
/>
3532
)}
36-
</div>
37-
38-
<div className="pt-14">{children}</div>
33+
</header>
3934
</>
4035
);
4136
};

src/components/header/MainHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const MainHeader = ({ isLoggedIn }: { isLoggedIn: boolean }) => {
1111
};
1212

1313
return (
14-
<header className="flex h-[56px] w-full items-center justify-between bg-white pl-5">
14+
<div className="flex h-[56px] w-full items-center justify-between bg-white pl-5">
1515
<Link to="/" className="flex items-center">
1616
<img
1717
src="/public/icon/mbtipslogo.svg"
@@ -32,7 +32,7 @@ const MainHeader = ({ isLoggedIn }: { isLoggedIn: boolean }) => {
3232
onClick={handleNavigate}
3333
/>
3434
)}
35-
</header>
35+
</div>
3636
);
3737
};
3838

src/components/header/SubHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const SubHeader = ({
5656

5757
return (
5858
<>
59-
<header className="relative flex h-[56px] w-full items-center justify-between border-b border-gray-100 bg-white">
59+
<div className="relative flex h-[56px] w-full items-center justify-between border-b border-gray-100 bg-white">
6060
{showPreviousIcon && (
6161
<img
6262
src="/public/icon/arrow_left.svg"
@@ -85,7 +85,7 @@ const SubHeader = ({
8585
/>
8686
</button>
8787
)}
88-
</header>
88+
</div>
8989

9090
{isLeaveChatModalOpen && (
9191
<ActionConfirmModal

src/components/modal/TermsAndPrivacyModal.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ const TermsAndPrivacyModal = ({
77
closeModal
88
}: {
99
mode: "terms" | "privacy";
10-
closeModal: ()=>void;
10+
closeModal: () => void;
1111
}) => {
1212
const title = mode === "terms" ? "이용약관" : "개인정보처리방침";
13-
const description =
14-
mode === "terms"
15-
? TERMS
16-
: PRIVACY;
13+
const description = mode === "terms" ? TERMS : PRIVACY;
1714

18-
const handleOuterClick = () => {
19-
closeModal()
20-
}
15+
const handleOuterClick = () => {
16+
closeModal();
17+
};
2118

22-
const handleInnerClick = (e:MouseEvent) => {
23-
e.stopPropagation();
24-
}
19+
const handleInnerClick = (e: MouseEvent) => {
20+
e.stopPropagation();
21+
};
2522

2623
return (
27-
<div className="inset-0 fixed flex items-center justify-center z-50 bg-black/50" onClick={handleOuterClick}>
28-
<div className="relative rounded-lg flex flex-col items-center w-[360px] h-[476px] bg-white px-[45px] py-[25px] overflow-scroll " onClick={handleInnerClick}>
29-
<h1 className="font-bold text-2xl ">{title}</h1>
30-
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
31-
<button
32-
onClick={closeModal}
33-
className="absolute top-6 right-4"
24+
<div
25+
className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
26+
onClick={handleOuterClick}
27+
>
28+
<div
29+
className="relative flex h-[476px] w-[360px] flex-col items-center overflow-scroll rounded-lg bg-white px-[45px] py-[25px] "
30+
onClick={handleInnerClick}
3431
>
35-
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
36-
</button>
37-
</div>
32+
<h1 className="text-2xl font-bold ">{title}</h1>
33+
<p className="mt-[30px] whitespace-pre-wrap">{description}</p>
34+
<button onClick={closeModal} className="absolute top-6 right-4">
35+
<img src="/icon/close.svg" alt="닫기 버튼" width={22} height={22} />
36+
</button>
37+
</div>
3838
</div>
3939
);
4040
};

0 commit comments

Comments
 (0)