From 4774d728f9bdfbba34227eeb793ff98280b9d88c Mon Sep 17 00:00:00 2001 From: goeun208 <80875784+goeun208@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:17:55 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=B2=AB=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=EB=B7=B0=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 모바일 뷰 작업 1차(/user, /participant, /vote/detail) * fix: prettier error * Fix: document is undefined error * Style: 출발 위치 깃발 아이콘 크기 조정 * Style: 장소 추천 높이 통일 * Feat: 푸터 링크 추가 외 2건 * Fix: 투표 페이지 data 전달 방식 변경, 선택 오류 수정, Feat: focus 시 refetch 막기 * Fix: login before page 모바일뷰 --- .../common/button/google/GoogleButton.tsx | 15 ++++++++++-- .../common/button/kakao/KakaoButton.tsx | 15 ++++++++++-- .../common/button/naver/NaverButton.tsx | 13 +++++++++- src/components/home/Home1.tsx | 24 +++++++++++++++---- src/components/home/Home2.tsx | 2 +- src/components/home/Home3.tsx | 2 +- src/pages/participant/myInfo/index.tsx | 2 +- 7 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/components/common/button/google/GoogleButton.tsx b/src/components/common/button/google/GoogleButton.tsx index 4780a03..3ecf6bd 100644 --- a/src/components/common/button/google/GoogleButton.tsx +++ b/src/components/common/button/google/GoogleButton.tsx @@ -6,13 +6,24 @@ const GoogleLoginButton = () => { const CLIENT_ID = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID; const REDIRECT_URI = process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI; const LINK = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&response_type=code&scope=email%20profile%20openid&access_type=offline`; + let clientWidth: any; + + if (typeof document !== 'undefined') { + clientWidth = document.documentElement.clientWidth; + } function googleLogin() { router.push(LINK); } return ( -
- +
+ {clientWidth && clientWidth <= 480 ? ( + + + + ) : ( + + )}
); }; diff --git a/src/components/common/button/kakao/KakaoButton.tsx b/src/components/common/button/kakao/KakaoButton.tsx index c7daa5f..4dd95b3 100644 --- a/src/components/common/button/kakao/KakaoButton.tsx +++ b/src/components/common/button/kakao/KakaoButton.tsx @@ -6,13 +6,24 @@ const KakaoLoginButton = () => { const REST_API_KEY = 'da98b670c28171c6bae91e1f6fa272c3'; const REDIRECT_URI = process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI; const LINK = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; + let clientWidth: any; + + if (typeof document !== 'undefined') { + clientWidth = document.documentElement.clientWidth; + } function kakaoLogin() { router.push(LINK); } return ( -
- +
+ {clientWidth && clientWidth <= 480 ? ( + + + + ) : ( + + )}
); }; diff --git a/src/components/common/button/naver/NaverButton.tsx b/src/components/common/button/naver/NaverButton.tsx index 5da8e14..ff1d5fc 100644 --- a/src/components/common/button/naver/NaverButton.tsx +++ b/src/components/common/button/naver/NaverButton.tsx @@ -6,13 +6,24 @@ const NaverLoginButton = () => { const CLIENT_ID = process.env.NEXT_PUBLIC_NAVER_CLIENT_ID; const REDIRECT_URI = process.env.NEXT_PUBLIC_NAVER_REDIRECT_URI; const LINK = `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${CLIENT_ID}&state=STATE_STRING&redirect_uri=${REDIRECT_URI}`; + let clientWidth: any; + + if (typeof document !== 'undefined') { + clientWidth = document.documentElement.clientWidth; + } function naverLogin() { router.push(LINK); } return (
- + {clientWidth && clientWidth <= 480 ? ( + + + + ) : ( + + )}
); }; diff --git a/src/components/home/Home1.tsx b/src/components/home/Home1.tsx index 86382bd..0b32a9b 100644 --- a/src/components/home/Home1.tsx +++ b/src/components/home/Home1.tsx @@ -5,18 +5,32 @@ import GoogleLoginButton from '../common/button/google/GoogleButton'; import NaverLoginButton from '../common/button/naver/NaverButton'; const Home1 = () => { + let clientWidth: any; + + if (typeof document !== 'undefined') { + clientWidth = document.documentElement.clientWidth; + } + return ( -
+
{/* part1 : logo 및 소셜로그인 */} - -
+ {clientWidth && clientWidth <= 480 ? ( + + + + ) : ( + + )} + +
-
+ {/* */} +
왜 소셜로그인으로 로그인하나요?
-
+
모이닷은 여러분들의 모임관리가 수월하도록 장소 조율 내역을 저장하기 때문에 소셜로그인이 필요합니다. 히스토리 저장 외의 목적으로 개인정보를 수집하지 않습니다.
diff --git a/src/components/home/Home2.tsx b/src/components/home/Home2.tsx index 9d010e2..921ced3 100644 --- a/src/components/home/Home2.tsx +++ b/src/components/home/Home2.tsx @@ -7,7 +7,7 @@ const Home2 = () => { return ( <> {/* part2 : 모이닷 소개 */} -
+
diff --git a/src/components/home/Home3.tsx b/src/components/home/Home3.tsx index 14c2eee..fc72d98 100644 --- a/src/components/home/Home3.tsx +++ b/src/components/home/Home3.tsx @@ -28,7 +28,7 @@ export const swipeList: ISwipeList[] = [ ]; const Home3 = () => { return ( -
+
diff --git a/src/pages/participant/myInfo/index.tsx b/src/pages/participant/myInfo/index.tsx index 6176b34..89cef79 100644 --- a/src/pages/participant/myInfo/index.tsx +++ b/src/pages/participant/myInfo/index.tsx @@ -48,7 +48,7 @@ const MyInfoUpdatePage = () => { const geocoder = new window.kakao.maps.services.Geocoder(); geocoder.addressSearch(userData.address, function (result: any, status: any) { - // 정상적으로 검색이 완료됐으면 + // 정상적으로 검색이 완료된 경우 if (status === window.kakao.maps.services.Status.OK) { setLocation({ location: userData.address, lng: result[0].x, lat: result[0].y }); }