From 44259a8f5f6c7d2100c3ab8b48f898d78f9acc03 Mon Sep 17 00:00:00 2001 From: minseokiim Date: Sun, 28 Jan 2024 00:05:17 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=EC=95=BD=EA=B4=80=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/loginSheets/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/loginSheets/index.tsx b/components/loginSheets/index.tsx index 5b0aca45..802148f4 100644 --- a/components/loginSheets/index.tsx +++ b/components/loginSheets/index.tsx @@ -189,7 +189,7 @@ const LoginSheet = ({ /> 보기 @@ -220,7 +220,7 @@ const LoginSheet = ({ /> 보기 From b913e120efa9e092c72fe05c743c21b31f55455f Mon Sep 17 00:00:00 2001 From: minseokiim Date: Sun, 28 Jan 2024 00:32:12 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?max=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/zodSchema.ts | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/constants/zodSchema.ts b/constants/zodSchema.ts index ab7b7ae0..883ee159 100644 --- a/constants/zodSchema.ts +++ b/constants/zodSchema.ts @@ -1,20 +1,13 @@ import { z } from 'zod'; export const nameSchema = z.object({ - nickname: z + name: z .string() .min(2, { - message: - '공백을 제외한 한글 + 영문 + 숫자만 2~8자리 조합으로 설정 해주세요.', + message: '올바르지 않은 이름 형식입니다.', }) - .max( - 8, - '공백을 제외한 한글 + 영문 + 숫자만 2~8자리 조합으로 설정 해주세요.', - ) - .regex( - /^[a-zA-Z0-9가-힣]*$/, - '공백을 제외한 한글 + 영문 + 숫자만 2~8자리 조합으로 설정 해주세요.', - ), + .max(8, '올바르지 않은 이름 형식입니다.') + .regex(/^[a-zA-Z가-힣]*$/, '올바르지 않은 이름 형식입니다.'), }); export const nicknameSchema = z.object({ @@ -41,8 +34,11 @@ export const accountSchema = z.object({ .regex(/^[0-9]*$/, '계좌번호는 숫자만 입력 가능합니다.'), name: z .string() - .min(2, '이름은 한글과 영어로만 입력 가능합니다.') - .regex(/^[a-zA-Z가-힣]*$/, '이름은 한글과 영어로만 입력 가능합니다.'), + .min(2, { + message: '올바르지 않은 이름 형식입니다.', + }) + .max(8, '올바르지 않은 이름 형식입니다.') + .regex(/^[a-zA-Z가-힣]*$/, '올바르지 않은 이름 형식입니다.'), bank: z.string({ required_error: '은행을 선택해주세요.', }), @@ -126,7 +122,10 @@ export const authDataSchema = z export const userInfoSchema = z.object({ name: z .string() - .min(2, '올바르지 않은 이름 형식입니다.') + .min(2, { + message: '올바르지 않은 이름 형식입니다.', + }) + .max(8, '올바르지 않은 이름 형식입니다.') .regex(/^[a-zA-Z가-힣]*$/, '올바르지 않은 이름 형식입니다.'), phone: z .string() From 26965ef1eb49249569a6a629cd26fa8311bb938f Mon Sep 17 00:00:00 2001 From: minseokiim Date: Sun, 28 Jan 2024 00:35:28 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=EC=8B=9C=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/signup/next/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/signup/next/index.tsx b/components/signup/next/index.tsx index 8b390fa3..9c4d99eb 100644 --- a/components/signup/next/index.tsx +++ b/components/signup/next/index.tsx @@ -85,7 +85,7 @@ const SignUpInfo = () => { }, ); - router.push('/mypage'); + window.location.href = '/mypage'; } }) .catch((error) => { From 2a3d7ed8e0c0f34532e66f6c5d3f2850ee3b7f2b Mon Sep 17 00:00:00 2001 From: jimin Date: Sun, 28 Jan 2024 01:29:35 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=8E=A8=20style=20:=20=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=20=ED=99=88=20=EB=B0=98=EC=9D=91=ED=98=95=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/page.tsx | 2 +- components/common/footer/index.tsx | 14 +++-- .../home/catch/catchContainer/index.tsx | 6 +-- components/home/catch/catchItem/index.tsx | 44 +++++++++++---- .../home/catch/catchSkeletonUI/index.tsx | 54 +++++++++---------- components/home/header/index.tsx | 23 ++++++-- .../home/review/reviewContainer/index.tsx | 4 +- components/home/review/reviewItem/index.tsx | 12 +++-- components/home/searchBar/index.tsx | 33 +++++++++--- public/svgComponent/logo.tsx | 4 +- 10 files changed, 131 insertions(+), 65 deletions(-) diff --git a/app/home/page.tsx b/app/home/page.tsx index 42558fe1..3e099d01 100644 --- a/app/home/page.tsx +++ b/app/home/page.tsx @@ -11,7 +11,7 @@ import React from 'react'; const page = async () => { return ( -
+
{/* 검색바 컴포넌트 */} diff --git a/components/common/footer/index.tsx b/components/common/footer/index.tsx index 6a099c2d..b66cad70 100644 --- a/components/common/footer/index.tsx +++ b/components/common/footer/index.tsx @@ -6,8 +6,8 @@ import Link from 'next/link'; const Footer = () => { return (
-
-

캐치룸

+
+

캐치룸

주소 서울특별시 강남구 테헤란로 108길 42 @@ -20,7 +20,7 @@ const Footer = () => { 09:00 - 18:00
(점심시간 12:00 - 13:00)

-
+

FAQ

@@ -30,9 +30,13 @@ const Footer = () => {

서비스 이용약관

- 야놀자 로고 + 야놀자 로고
-
+
(주)야놀자는 통신판매중개자로서 통신판매의 당사자가 아니며 상품의 예약, 이용 및 환불 등과 관련한 의무와 책임은 각 판매자에게 있습니다.
diff --git a/components/home/catch/catchContainer/index.tsx b/components/home/catch/catchContainer/index.tsx index 4db4d63a..78656996 100644 --- a/components/home/catch/catchContainer/index.tsx +++ b/components/home/catch/catchContainer/index.tsx @@ -12,18 +12,18 @@ const CatchContainer = () => { return (
-

+

캐치특가 숙소 50%~

전체보기
-

+

구매가 대비 50% 이상 할인된 숙소

diff --git a/components/home/catch/catchItem/index.tsx b/components/home/catch/catchItem/index.tsx index cf020e87..f45cabba 100644 --- a/components/home/catch/catchItem/index.tsx +++ b/components/home/catch/catchItem/index.tsx @@ -30,6 +30,24 @@ const CatchItem = ({ const id = productId!.toString(); + const [screenSize, setScreenSize] = useState('l'); + + useEffect(() => { + window.scrollTo(0, 0); + const checkScreenSize = () => { + if (window.innerWidth >= 390) setScreenSize('l'); + else if (window.innerHeight >= 320 && window.innerWidth < 390) + setScreenSize('m'); + else setScreenSize('s'); + }; + + // 초기 화면 크기 체크 + checkScreenSize(); + + // 창 크기 변경 시 이벤트 리스너 추가 + window.addEventListener('resize', checkScreenSize); + }, []); + useEffect(() => { setIsBtnActive(userZimState); }, [userZimState]); @@ -59,17 +77,18 @@ const CatchItem = ({ return (
-
+
{region}
-
+
{data?.userIdentity === 'BUYER' ? (
찜하기 버튼
@@ -77,6 +96,8 @@ const CatchItem = ({ isButtonActive={isBtnActive} stateHandler={activeHandler} whiteStroke={true} + width={screenSize === 'l' ? 24 : 16} + height={screenSize === 'l' ? 24 : 16} />
@@ -84,14 +105,17 @@ const CatchItem = ({ '' )}
-
+
숙소이미지
-

+

{checkInString} - {checkOutString}

-

+

구매가 {originalPrice?.toLocaleString()}

-
+
{accommodationName.length > 7 ? `${accommodationName.substring(0, 7)}...` : accommodationName}
-
+
{discountRate}% {sellPrice?.toLocaleString()}원
diff --git a/components/home/catch/catchSkeletonUI/index.tsx b/components/home/catch/catchSkeletonUI/index.tsx index 773f5e6f..5647302f 100644 --- a/components/home/catch/catchSkeletonUI/index.tsx +++ b/components/home/catch/catchSkeletonUI/index.tsx @@ -26,7 +26,7 @@ const CatchSkeletonUI = () => { role="status" className="space-y-8 animate-pulse sm:w-80 md:w-80 md:space-y-0 rtl:space-x-reverse md:items-center border border-gray-200 mt-5 rounded" > -
+
-
+
-
-
+
+
-
+
-
+
@@ -53,9 +53,9 @@ const CatchSkeletonUI = () => {
-
+
-
+
-
-
+
+
-
+
-
+
@@ -82,9 +82,9 @@ const CatchSkeletonUI = () => {
-
+
-
+
-
-
+
+
-
+
-
+
@@ -111,9 +111,9 @@ const CatchSkeletonUI = () => {
-
+
-
+
-
-
+
+
-
+
-
+
diff --git a/components/home/header/index.tsx b/components/home/header/index.tsx index 3552339c..8d79c6a6 100644 --- a/components/home/header/index.tsx +++ b/components/home/header/index.tsx @@ -1,19 +1,34 @@ +'use client'; import Logo from '@/public/svgComponent/logo'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; const Header = () => { + const [screenSize, setScreenSize] = useState('l'); + + useEffect(() => { + const checkScreenSize = () => { + if (window.innerWidth >= 390) setScreenSize('l'); + else if (window.innerHeight >= 320 && window.innerWidth < 390) + setScreenSize('m'); + else setScreenSize('s'); + }; + checkScreenSize(); + window.addEventListener('resize', checkScreenSize); + }, []); return (

초특가 숙박권

빠르게 캐치하자!

-
+
- +

은 무료 취소가 불가능한 야놀자 숙박권을

-

간편하게 거래할 수 있는 중개 플랫폼입니다.

diff --git a/components/home/review/reviewContainer/index.tsx b/components/home/review/reviewContainer/index.tsx index 3db7800b..a59209e2 100644 --- a/components/home/review/reviewContainer/index.tsx +++ b/components/home/review/reviewContainer/index.tsx @@ -13,10 +13,10 @@ const ReviewContainer = () => { return (
-

이용후기

+

이용후기

전체보기 diff --git a/components/home/review/reviewItem/index.tsx b/components/home/review/reviewItem/index.tsx index 6cb5c92e..ed287c21 100644 --- a/components/home/review/reviewItem/index.tsx +++ b/components/home/review/reviewItem/index.tsx @@ -11,7 +11,7 @@ const ReviewItem = ({ }: ReviewItemType) => { return (
-
+
-

{productName}

-

{content}

-

+

+ {productName} +

+

+ {content} +

+

{userName} • {date}

diff --git a/components/home/searchBar/index.tsx b/components/home/searchBar/index.tsx index 98fd700d..e4005dbd 100644 --- a/components/home/searchBar/index.tsx +++ b/components/home/searchBar/index.tsx @@ -1,12 +1,21 @@ 'use client'; -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import Image from 'next/image'; import { useRouter } from 'next/navigation'; const SearchBar = () => { + const [screenSize, setScreenSize] = useState('l'); + useEffect(() => { - window.scrollTo(0, 0); + const checkScreenSize = () => { + if (window.innerWidth >= 390) setScreenSize('l'); + else if (window.innerHeight >= 320 && window.innerWidth < 390) + setScreenSize('m'); + else setScreenSize('s'); + }; + checkScreenSize(); + window.addEventListener('resize', checkScreenSize); }, []); const router = useRouter(); @@ -14,14 +23,24 @@ const SearchBar = () => { router.push('/search-detail'); }; + const title = + screenSize === 'l' + ? '지역, 여행 일정, 숙소 유형으로 검색해보세요' + : '지역, 여행 일정, 숙소 유형으로 검색'; return ( - +

{title}

+ searchIcon +
); }; diff --git a/public/svgComponent/logo.tsx b/public/svgComponent/logo.tsx index fbba68a3..318cfbfe 100644 --- a/public/svgComponent/logo.tsx +++ b/public/svgComponent/logo.tsx @@ -1,7 +1,7 @@ import * as React from "react"; -const Logo = () => ( - +const Logo = ({width = 48, height = 16} : {width ?: number, height ?: number}) => ( +