diff --git a/frontend/public/kakao_login_medium_wide.png b/frontend/public/kakao_login_medium_wide.png deleted file mode 100644 index c882acc7..00000000 Binary files a/frontend/public/kakao_login_medium_wide.png and /dev/null differ diff --git a/frontend/src/business/hooks/usePopup/useLoginPopup.tsx b/frontend/src/business/hooks/usePopup/useLoginPopup.tsx new file mode 100644 index 00000000..3eca8181 --- /dev/null +++ b/frontend/src/business/hooks/usePopup/useLoginPopup.tsx @@ -0,0 +1,17 @@ +import LoginPopup from '@components/Popup/LoginPopup'; + +import useOverlay from '@business/hooks/useOverlay'; + +interface UseLoginPopupParams { + moveAiChat: () => void; +} + +export function useLoginPopup({ moveAiChat }: UseLoginPopupParams) { + const { open } = useOverlay(); + + const openLoginPopup = () => { + open(() => ); + }; + + return { openLoginPopup }; +} diff --git a/frontend/src/components/Buttons/Button.tsx b/frontend/src/components/Buttons/Button.tsx index 83ab52cb..4e2db8f1 100644 --- a/frontend/src/components/Buttons/Button.tsx +++ b/frontend/src/components/Buttons/Button.tsx @@ -10,15 +10,28 @@ interface ButtonProps { children?: React.ReactNode; circle?: boolean; onClick?: () => void; + width?: number; + height?: number; } -function Button({ size = 'm', color = 'active', disabled = false, children, onClick, circle = false }: ButtonProps) { +function Button({ + size = 'm', + color = 'active', + disabled = false, + children, + onClick, + circle = false, + width, + height, +}: ButtonProps) { return ( + ); } diff --git a/frontend/src/components/Popup/LoginPopup.tsx b/frontend/src/components/Popup/LoginPopup.tsx new file mode 100644 index 00000000..4650a4ff --- /dev/null +++ b/frontend/src/components/Popup/LoginPopup.tsx @@ -0,0 +1,28 @@ +import { Button, KakaoLoginButton } from '@components/Buttons'; + +interface LoginPopupProps { + moveAiChat: () => void; +} +export default function LoginPopup({ moveAiChat }: LoginPopupProps) { + return ( +
+
+
+ 로그인을 하면 +
+ 이전 상담 기록을 다시 볼 수 있어요 +
+
+ + +
+
+
+ ); +} diff --git a/frontend/src/constants/colors.ts b/frontend/src/constants/colors.ts index 430f7fd5..fe65a73a 100644 --- a/frontend/src/constants/colors.ts +++ b/frontend/src/constants/colors.ts @@ -5,6 +5,7 @@ export const iconColorMap = { textWeak: 'text-weak', textWhite: 'text-white-default', kakaoIcon: 'kakao-icon', + kakao: 'text-kakao', }; export type IconColor = keyof typeof iconColorMap; @@ -15,6 +16,7 @@ export const ButtonColorMap: Record = { disabled: 'surface-box text-weak', dark: 'surface-alt text-white', transparent: 'bg-transparent hover:bg-transparent hover:border-transparent', + kakao: 'surface-kakao text-kakao', }; export type ButtonColor = keyof typeof ButtonColorMap; diff --git a/frontend/src/pages/HomePage/HomePage.tsx b/frontend/src/pages/HomePage/HomePage.tsx index 0aaa6224..d99b03b8 100644 --- a/frontend/src/pages/HomePage/HomePage.tsx +++ b/frontend/src/pages/HomePage/HomePage.tsx @@ -1,14 +1,16 @@ import { useNavigate } from 'react-router-dom'; import Background from '@components/Background'; -import { Button, KakaoLoginButton } from '@components/Buttons'; +import { Button } from '@components/Buttons'; + +import { useLoginPopup } from '@business/hooks/usePopup/useLoginPopup'; function HomePage() { const navigate = useNavigate(); - const moveAiChat = () => { - navigate('/chat/ai'); - }; + const moveAiChat = () => navigate('/chat/ai'); + + const { openLoginPopup } = useLoginPopup({ moveAiChat }); const moveHumanChat = () => { navigate('/chat/human', { state: { host: true } }); @@ -16,17 +18,14 @@ function HomePage() { return ( -
- -
- - -
+
+ +
); diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index cb10b325..6c6a195a 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -120,6 +120,7 @@ export default { '.text-weak': { color: '#879298' }, '.text-white-default': { color: '#FFFFFF' }, '.text-white-alt': { color: '#d7dde4' }, + '.text-kakao': { color: 'rgba(0, 0, 0, 0.9)' }, '.kakao-icon': { color: '#FEE500' }, '.display-bold24': themeBase.bold_L, '.display-bold16': themeBase.bold_M, @@ -152,6 +153,7 @@ export default { '.surface-content': { background: '#FFFFFF' }, '.surface-box': { background: '#ECECEC' }, '.surface-box-alt': { background: '#7390B1' }, + '.surface-kakao': { background: '#FEE500' }, }; addComponents(surfaceTheme); },