From 2d6d624fad1522db2ef78a34a1a1e97153bcec40 Mon Sep 17 00:00:00 2001 From: jisu Seo Date: Wed, 3 Jan 2024 14:16:25 +0900 Subject: [PATCH 01/33] =?UTF-8?q?Design:=20=EC=83=89=EC=83=81,=20=ED=83=80?= =?UTF-8?q?=EC=9D=B4=ED=8F=AC=EA=B7=B8=EB=9E=98=ED=94=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.css | 39 +++++++++++++++++++++++++++++++-------- tailwind.config.js | 6 +++++- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/index.css b/src/index.css index 1d63d1d4..f35dbd15 100644 --- a/src/index.css +++ b/src/index.css @@ -47,17 +47,38 @@ code { .title3, .headline1, .headline2, + .body1, .body2, - .body4 { + .body3, + .body4, + .body5, + .body6, + .caption1, + .caption2 { + font-style: normal; + line-height: normal; + } + + .title1, + .title2, + .title3, + .headline1, + .headline2, + .body2 { @apply font-bold; } } -.body5, -.caption1 { +.body1, +.body5 { @apply font-medium; } +.body3, +.caption1 { + @apply font-semibold; +} + .title1 { font-size: 24px; } @@ -73,22 +94,24 @@ code { .headline1 { font-size: 16px; } + .headline2, .body1 { font-size: 15px; } .body2, -.body3 { +.body3, +.body4, +.body5 { font-size: 14px; } -.body4, -.body5, + .body6 { - font-size: 12px; + font-size: 13px; } .caption1, .caption2 { - font-size: 11px; + font-size: 12px; } diff --git a/tailwind.config.js b/tailwind.config.js index 40df3e50..52c00582 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,7 +4,10 @@ export default { theme: { extend: { colors: { - primary: '#29DDF6', + main1: '#29DDF6', + main2: '#062139', + sub1: '#FFEC3E', + sub2: 'FF2167', gray1: '#f8f8f8', gray2: '#ededed', gray3: '#d7d7d7', @@ -12,6 +15,7 @@ export default { gray5: '#5e5e5e', gray6: '#38393C', gray7: '#1E1E1E', + red: '#F00', }, }, }, From e0c4f3979fe1a3c047435b49464b19fffdd1f5ea Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Wed, 3 Jan 2024 15:50:40 +0900 Subject: [PATCH 02/33] =?UTF-8?q?refactor:=20=ED=8F=B4=EB=8D=94=EB=AA=85?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{DetailTourButtons.tsx => DetailToursButtons.tsx} | 0 .../DetailSectionTop/{DetailToutsMap.tsx => DetailToursMap.tsx} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/components/DetailSectionTop/{DetailTourButtons.tsx => DetailToursButtons.tsx} (100%) rename src/components/DetailSectionTop/{DetailToutsMap.tsx => DetailToursMap.tsx} (100%) diff --git a/src/components/DetailSectionTop/DetailTourButtons.tsx b/src/components/DetailSectionTop/DetailToursButtons.tsx similarity index 100% rename from src/components/DetailSectionTop/DetailTourButtons.tsx rename to src/components/DetailSectionTop/DetailToursButtons.tsx diff --git a/src/components/DetailSectionTop/DetailToutsMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx similarity index 100% rename from src/components/DetailSectionTop/DetailToutsMap.tsx rename to src/components/DetailSectionTop/DetailToursMap.tsx From d3ba27858598b05a27877f19a8893164ebbbf412 Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 16:07:15 +0900 Subject: [PATCH 03/33] =?UTF-8?q?CHore:=201=EC=B0=A8=20=EC=B6=A9=EB=8F=8C?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailSectionBottom/DetailSectionBottom.tsx | 2 +- src/components/DetailSectionTop/DetailSectionTop.tsx | 2 +- src/components/DetailSectionTop/index.tsx | 2 +- src/main.tsx | 2 +- src/pages/detail/detail.page.tsx | 2 ++ src/router/mainRouter.tsx | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/DetailSectionBottom/DetailSectionBottom.tsx b/src/components/DetailSectionBottom/DetailSectionBottom.tsx index 63c6ce89..afd572f2 100644 --- a/src/components/DetailSectionBottom/DetailSectionBottom.tsx +++ b/src/components/DetailSectionBottom/DetailSectionBottom.tsx @@ -5,7 +5,7 @@ export default function DetailSectionBottom() { return ( <> - {/* */} + ); } diff --git a/src/components/DetailSectionTop/DetailSectionTop.tsx b/src/components/DetailSectionTop/DetailSectionTop.tsx index 73ea4722..768c3325 100644 --- a/src/components/DetailSectionTop/DetailSectionTop.tsx +++ b/src/components/DetailSectionTop/DetailSectionTop.tsx @@ -28,7 +28,7 @@ export default function DetailSectionTop() { if (detailQuery.error || reviewQuery.error) console.log('error - 예외 처리'); return detailQuery.data && reviewQuery.data?.data.data ? ( -
+
diff --git a/src/components/DetailSectionTop/index.tsx b/src/components/DetailSectionTop/index.tsx index 3d938ea5..87ca1669 100644 --- a/src/components/DetailSectionTop/index.tsx +++ b/src/components/DetailSectionTop/index.tsx @@ -1,7 +1,7 @@ import DetailToursInfo from './DetailToursInfo'; import DetailToursRating from './DetailToursRating'; import DetailToursMap from './DetailToursMap'; -import DetailTourButtons from './DetailTourButtons'; +import DetailTourButtons from './DetailToursButtons'; export { DetailToursInfo, diff --git a/src/main.tsx b/src/main.tsx index 5a5ade53..b02fb145 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,7 +4,7 @@ import './index.css'; if (import.meta.env.DEV) { const { worker } = await import('./mocks/browser.ts'); - await worker.stop(); + await worker.start(); } ReactDOM.createRoot(document.getElementById('root')!).render(); diff --git a/src/pages/detail/detail.page.tsx b/src/pages/detail/detail.page.tsx index d4a03108..22223af7 100644 --- a/src/pages/detail/detail.page.tsx +++ b/src/pages/detail/detail.page.tsx @@ -1,11 +1,13 @@ import { DetailHeader } from '@components/common/header'; import DetailSectionTop from '@components/DetailSectionTop/DetailSectionTop'; +import DetailSectionBottom from '@components/DetailSectionBottom/DetailSectionBottom'; const DetailTours = () => { return ( <> + ); }; diff --git a/src/router/mainRouter.tsx b/src/router/mainRouter.tsx index 152f4083..714836f3 100644 --- a/src/router/mainRouter.tsx +++ b/src/router/mainRouter.tsx @@ -7,7 +7,7 @@ import PostingReview from '@pages/postingReview/postingReview.page'; export function MainLayout() { return ( -
+
From 45e06b5ef06df36be75c07af29002ba4d58752bf Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Wed, 3 Jan 2024 16:20:28 +0900 Subject: [PATCH 04/33] =?UTF-8?q?refactor:=20=EC=8A=A4=ED=83=80=EC=9D=BC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 106 +++++++++++++++++- .../DetailSectionTop/DetailSectionTop.tsx | 6 +- .../DetailSectionTop/DetailToursMap.tsx | 2 +- src/components/DetailSectionTop/index.tsx | 4 +- src/pages/detail/detail.page.tsx | 2 + 5 files changed, 110 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b259404..8dbc2df4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,14 +18,18 @@ "path": "^0.12.7", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-infinite-scroller": "^1.2.6", "react-kakao-maps-sdk": "^1.1.24", "react-router-dom": "^6.21.1", "recoil": "^0.7.7", - "styled-components": "^6.1.3" + "styled-components": "^6.1.3", + "uuid": "^9.0.1" }, "devDependencies": { "@types/react": "^18.2.43", "@types/react-dom": "^18.2.17", + "@types/react-infinite-scroller": "^1.2.5", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.14.0", "@typescript-eslint/parser": "^6.14.0", "@vitejs/plugin-react": "^4.2.1", @@ -3382,6 +3386,15 @@ "@types/react": "*" } }, + "node_modules/@types/react-infinite-scroller": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/react-infinite-scroller/-/react-infinite-scroller-1.2.5.tgz", + "integrity": "sha512-fJU1jhMgoL6NJFrqTM0Ob7tnd2sQWGxe2ESwiU6FZWbJK/VO/Er5+AOhc+e2zbT0dk5pLygqctsulOLJ8xnSzw==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", @@ -3415,6 +3428,12 @@ "@types/node": "*" } }, + "node_modules/@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz", @@ -6229,7 +6248,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6799,6 +6817,16 @@ "node": ">= 0.6.0" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -6856,6 +6884,22 @@ "react": "^18.2.0" } }, + "node_modules/react-infinite-scroller": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/react-infinite-scroller/-/react-infinite-scroller-1.2.6.tgz", + "integrity": "sha512-mGdMyOD00YArJ1S1F3TVU9y4fGSfVVl6p5gh/Vt4u99CJOptfVu/q5V/Wlle72TMgYlBwIhbxK5wF0C/R33PXQ==", + "dependencies": { + "prop-types": "^15.5.8" + }, + "peerDependencies": { + "react": "^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/react-kakao-maps-sdk": { "version": "1.1.24", "resolved": "https://registry.npmjs.org/react-kakao-maps-sdk/-/react-kakao-maps-sdk-1.1.24.tgz", @@ -7784,6 +7828,18 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/vite": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", @@ -10131,6 +10187,15 @@ "@types/react": "*" } }, + "@types/react-infinite-scroller": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/react-infinite-scroller/-/react-infinite-scroller-1.2.5.tgz", + "integrity": "sha512-fJU1jhMgoL6NJFrqTM0Ob7tnd2sQWGxe2ESwiU6FZWbJK/VO/Er5+AOhc+e2zbT0dk5pLygqctsulOLJ8xnSzw==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/scheduler": { "version": "0.16.8", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", @@ -10164,6 +10229,12 @@ "@types/node": "*" } }, + "@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "6.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz", @@ -12118,8 +12189,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-hash": { "version": "3.0.0", @@ -12445,6 +12515,16 @@ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" }, + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -12479,6 +12559,19 @@ "scheduler": "^0.23.0" } }, + "react-infinite-scroller": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/react-infinite-scroller/-/react-infinite-scroller-1.2.6.tgz", + "integrity": "sha512-mGdMyOD00YArJ1S1F3TVU9y4fGSfVVl6p5gh/Vt4u99CJOptfVu/q5V/Wlle72TMgYlBwIhbxK5wF0C/R33PXQ==", + "requires": { + "prop-types": "^15.5.8" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "react-kakao-maps-sdk": { "version": "1.1.24", "resolved": "https://registry.npmjs.org/react-kakao-maps-sdk/-/react-kakao-maps-sdk-1.1.24.tgz", @@ -13127,6 +13220,11 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "vite": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", diff --git a/src/components/DetailSectionTop/DetailSectionTop.tsx b/src/components/DetailSectionTop/DetailSectionTop.tsx index 73ea4722..34eb2cbf 100644 --- a/src/components/DetailSectionTop/DetailSectionTop.tsx +++ b/src/components/DetailSectionTop/DetailSectionTop.tsx @@ -8,7 +8,7 @@ import { DetailToursInfo, DetailToursRating, DetailToursMap, - DetailTourButtons, + DetailToursButtons, } from '.'; export default function DetailSectionTop() { @@ -28,11 +28,11 @@ export default function DetailSectionTop() { if (detailQuery.error || reviewQuery.error) console.log('error - 예외 처리'); return detailQuery.data && reviewQuery.data?.data.data ? ( -
+
- +
) : null; } diff --git a/src/components/DetailSectionTop/DetailToursMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx index 40d0629b..2a4bd28b 100644 --- a/src/components/DetailSectionTop/DetailToursMap.tsx +++ b/src/components/DetailSectionTop/DetailToursMap.tsx @@ -14,7 +14,7 @@ export default function DetailToursMap({ mapData }: DetailToursMapProps) { const [isMapVisible, setIsMapVisible] = useState(false); const MapStyle = { - width: '325px', + width: '372px', height: isMapVisible ? 0 : '150px', marginTop: isMapVisible ? '15px' : '15px', marginBottom: isMapVisible ? '15px' : '15px', diff --git a/src/components/DetailSectionTop/index.tsx b/src/components/DetailSectionTop/index.tsx index 3d938ea5..ca314b0c 100644 --- a/src/components/DetailSectionTop/index.tsx +++ b/src/components/DetailSectionTop/index.tsx @@ -1,11 +1,11 @@ import DetailToursInfo from './DetailToursInfo'; import DetailToursRating from './DetailToursRating'; import DetailToursMap from './DetailToursMap'; -import DetailTourButtons from './DetailTourButtons'; +import DetailToursButtons from './DetailToursButtons'; export { DetailToursInfo, DetailToursRating, DetailToursMap, - DetailTourButtons, + DetailToursButtons, }; diff --git a/src/pages/detail/detail.page.tsx b/src/pages/detail/detail.page.tsx index d4a03108..22223af7 100644 --- a/src/pages/detail/detail.page.tsx +++ b/src/pages/detail/detail.page.tsx @@ -1,11 +1,13 @@ import { DetailHeader } from '@components/common/header'; import DetailSectionTop from '@components/DetailSectionTop/DetailSectionTop'; +import DetailSectionBottom from '@components/DetailSectionBottom/DetailSectionBottom'; const DetailTours = () => { return ( <> + ); }; From 834627b37aa820fd17324beacb873239b3d895a8 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Wed, 3 Jan 2024 16:33:06 +0900 Subject: [PATCH 05/33] =?UTF-8?q?style:=20width,=20height=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailSectionTop/DetailToursButtons.tsx | 6 +++--- src/components/DetailSectionTop/DetailToursMap.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/DetailSectionTop/DetailToursButtons.tsx b/src/components/DetailSectionTop/DetailToursButtons.tsx index 7038e566..05e79202 100644 --- a/src/components/DetailSectionTop/DetailToursButtons.tsx +++ b/src/components/DetailSectionTop/DetailToursButtons.tsx @@ -3,12 +3,12 @@ import { ReactComponent as CalendarIcon } from '@assets/images/Calendar.svg'; export default function DetailTourButtons() { return ( -
- - diff --git a/src/components/DetailSectionTop/DetailToursMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx index 2a4bd28b..90719757 100644 --- a/src/components/DetailSectionTop/DetailToursMap.tsx +++ b/src/components/DetailSectionTop/DetailToursMap.tsx @@ -14,8 +14,8 @@ export default function DetailToursMap({ mapData }: DetailToursMapProps) { const [isMapVisible, setIsMapVisible] = useState(false); const MapStyle = { - width: '372px', - height: isMapVisible ? 0 : '150px', + width: '100%', + height: isMapVisible ? 0 : '180px', marginTop: isMapVisible ? '15px' : '15px', marginBottom: isMapVisible ? '15px' : '15px', transition: 'height 0.3s ease-in-out', From 9b419e01f2b1d66c90caf98eb96c3ac580d01d3c Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 16:38:55 +0900 Subject: [PATCH 06/33] =?UTF-8?q?Chore:=202=EC=B0=A8=20=EC=B6=A9=EB=8F=8C?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DetailSectionBottom/DetailReviewStats.tsx | 4 ++-- src/components/DetailSectionBottom/DetailSectionBottom.tsx | 2 +- src/components/DetailSectionTop/DetailToursMap.tsx | 2 +- src/main.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/DetailSectionBottom/DetailReviewStats.tsx b/src/components/DetailSectionBottom/DetailReviewStats.tsx index 7ae451b4..61a80623 100644 --- a/src/components/DetailSectionBottom/DetailReviewStats.tsx +++ b/src/components/DetailSectionBottom/DetailReviewStats.tsx @@ -16,7 +16,7 @@ const DetailReviewStats = () => { {reviewStats && reviewStats.length > 0 ? ( reviewStats.slice(0, showAll ? reviewStats.length : 3).map((data) => (
-
+
{ backgroundColor: getColor(data.keywordCount), }} /> -
+

{getEmoji(data.content)}

diff --git a/src/components/DetailSectionBottom/DetailSectionBottom.tsx b/src/components/DetailSectionBottom/DetailSectionBottom.tsx index afd572f2..63c6ce89 100644 --- a/src/components/DetailSectionBottom/DetailSectionBottom.tsx +++ b/src/components/DetailSectionBottom/DetailSectionBottom.tsx @@ -5,7 +5,7 @@ export default function DetailSectionBottom() { return ( <> - + {/* */} ); } diff --git a/src/components/DetailSectionTop/DetailToursMap.tsx b/src/components/DetailSectionTop/DetailToursMap.tsx index 40d0629b..2a4bd28b 100644 --- a/src/components/DetailSectionTop/DetailToursMap.tsx +++ b/src/components/DetailSectionTop/DetailToursMap.tsx @@ -14,7 +14,7 @@ export default function DetailToursMap({ mapData }: DetailToursMapProps) { const [isMapVisible, setIsMapVisible] = useState(false); const MapStyle = { - width: '325px', + width: '372px', height: isMapVisible ? 0 : '150px', marginTop: isMapVisible ? '15px' : '15px', marginBottom: isMapVisible ? '15px' : '15px', diff --git a/src/main.tsx b/src/main.tsx index b02fb145..5a5ade53 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,7 +4,7 @@ import './index.css'; if (import.meta.env.DEV) { const { worker } = await import('./mocks/browser.ts'); - await worker.start(); + await worker.stop(); } ReactDOM.createRoot(document.getElementById('root')!).render(); From 8cf0099fb861b5c48ff2e1ab011022c88638d00b Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 17:00:14 +0900 Subject: [PATCH 07/33] =?UTF-8?q?Chore:=20=EB=B0=B0=ED=8F=AC=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 48 +- .../DetailSectionBottom/DetailReview.tsx | 162 +- .../DetailSectionBottom.tsx | 2 +- .../DetailSectionBottom/ReviewItem.tsx | 2 +- src/components/DetailSectionBottom/index.tsx | 3 +- src/components/Review/ReviewRating.tsx | 2 +- src/main.tsx | 8 +- src/mocks/browser.ts | 6 +- src/mocks/handlers.ts | 1886 ++++++++--------- 10 files changed, 1080 insertions(+), 1040 deletions(-) diff --git a/package.json b/package.json index d080dfae..8439277e 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "prettier": "^3.1.1", "prettier-plugin-tailwindcss": "^0.5.9", "tailwindcss": "^3.4.0", + "terser": "^5.26.0", "typescript": "^5.2.2", "vite": "^5.0.8" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0389c4b3..3163368e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,12 +100,15 @@ devDependencies: tailwindcss: specifier: ^3.4.0 version: 3.4.0 + terser: + specifier: ^5.26.0 + version: 5.26.0 typescript: specifier: ^5.2.2 version: 5.3.3 vite: specifier: ^5.0.8 - version: 5.0.10 + version: 5.0.10(terser@5.26.0) packages: @@ -1713,6 +1716,13 @@ packages: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 + dev: true + /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} @@ -2524,7 +2534,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.6) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.0.10 + vite: 5.0.10(terser@5.26.0) transitivePeerDependencies: - supports-color dev: true @@ -2732,6 +2742,10 @@ packages: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -2856,6 +2870,10 @@ packages: delayed-stream: 1.0.0 dev: false + /commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: true + /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -4490,6 +4508,18 @@ packages: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -4645,6 +4675,17 @@ packages: - ts-node dev: true + /terser@5.26.0: + resolution: {integrity: sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==} + engines: {node: '>=10'} + hasBin: true + dependencies: + '@jridgewell/source-map': 0.3.5 + acorn: 8.11.2 + commander: 2.20.3 + source-map-support: 0.5.21 + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -4792,7 +4833,7 @@ packages: hasBin: true dev: false - /vite@5.0.10: + /vite@5.0.10(terser@5.26.0): resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -4823,6 +4864,7 @@ packages: esbuild: 0.19.10 postcss: 8.4.32 rollup: 4.9.1 + terser: 5.26.0 optionalDependencies: fsevents: 2.3.3 dev: true diff --git a/src/components/DetailSectionBottom/DetailReview.tsx b/src/components/DetailSectionBottom/DetailReview.tsx index b256bfe2..b68f9377 100644 --- a/src/components/DetailSectionBottom/DetailReview.tsx +++ b/src/components/DetailSectionBottom/DetailReview.tsx @@ -1,85 +1,85 @@ -import { getToursReviews } from '@api/tours'; -import { useEffect, useState } from 'react'; -import InfiniteScroll from 'react-infinite-scroller'; -import { useInfiniteQuery } from '@tanstack/react-query'; -import ReviewItem from './ReviewItem'; -import { StarIcon } from '@components/common/icons/Icons'; +// import { getToursReviews } from '@api/tours'; +// import { useEffect, useState } from 'react'; +// import InfiniteScroll from 'react-infinite-scroller'; +// import { useInfiniteQuery } from '@tanstack/react-query'; +// import ReviewItem from './ReviewItem'; +// import { StarIcon } from '@components/common/icons/Icons'; -export default function DetailReview() { - const [reviewDataLength, setReviewDataLength] = useState(0); - const tourItemId = 1; +// export default function DetailReview() { +// const [reviewDataLength, setReviewDataLength] = useState(0); +// const tourItemId = 1; - const { - data: toursReviews, - fetchNextPage, - hasNextPage, - } = useInfiniteQuery({ - queryKey: ['toursReviews'], - queryFn: ({ pageParam }) => getToursReviews(tourItemId), - initialPageParam: 0, - getNextPageParam: (lastPage, allPages, lastPageParam) => { - const lastData = lastPage?.data?.data?.reviewInfos; - return lastData && lastData.length === 4 ? lastPageParam + 1 : undefined; - }, - }); +// const { +// data: toursReviews, +// fetchNextPage, +// hasNextPage, +// } = useInfiniteQuery({ +// queryKey: ['toursReviews'], +// queryFn: ({ pageParam }) => getToursReviews(tourItemId), +// initialPageParam: 0, +// getNextPageParam: (lastPage, allPages, lastPageParam) => { +// const lastData = lastPage?.data?.data?.reviewInfos; +// return lastData && lastData.length === 4 ? lastPageParam + 1 : undefined; +// }, +// }); - useEffect(() => { - if (toursReviews) { - const totalCount = toursReviews.pages.reduce( - (accumulator, page) => - accumulator + (page?.data?.data?.reviewInfos?.length || 0), - 0, - ); - setReviewDataLength(totalCount); - } - }, [toursReviews]); +// useEffect(() => { +// if (toursReviews) { +// const totalCount = toursReviews.pages.reduce( +// (accumulator, page) => +// accumulator + (page?.data?.data?.reviewInfos?.length || 0), +// 0, +// ); +// setReviewDataLength(totalCount); +// } +// }, [toursReviews]); - return ( - <> -

- 리뷰 {reviewDataLength} -
- {reviewDataLength > 0 && ( - fetchNextPage()} - initialLoad={false}> - {toursReviews?.pages?.map((page, pageIndex) => ( -
- {page?.data?.data?.reviewInfos?.map( - (item: any, index: number) => ( - - ), - )} -
- ))} -
- )} - {reviewDataLength == 0 && ( -
-
- {Array.from({ length: 5 }, (_, index) => ( - - ))} -
-
첫번째 리뷰를 남겨주세요!
-
- )} - - ); -} +// return ( +// <> +//
+// 리뷰 {reviewDataLength} +//
+// {reviewDataLength > 0 && ( +// fetchNextPage()} +// initialLoad={false}> +// {toursReviews?.pages?.map((page, pageIndex) => ( +//
+// {page?.data?.data?.reviewInfos?.map( +// (item: any, index: number) => ( +// +// ), +// )} +//
+// ))} +//
+// )} +// {reviewDataLength == 0 && ( +//
+//
+// {Array.from({ length: 5 }, (_, index) => ( +// +// ))} +//
+//
첫번째 리뷰를 남겨주세요!
+//
+// )} +// +// ); +// } diff --git a/src/components/DetailSectionBottom/DetailSectionBottom.tsx b/src/components/DetailSectionBottom/DetailSectionBottom.tsx index 63c6ce89..9455ba17 100644 --- a/src/components/DetailSectionBottom/DetailSectionBottom.tsx +++ b/src/components/DetailSectionBottom/DetailSectionBottom.tsx @@ -1,4 +1,4 @@ -import { DetailReviewStats, DetailReview } from '.'; +import { DetailReviewStats } from '.'; // 담당 컴포넌트들 호출하는 컴포넌트(분업 때문에 페이지 느낌으로 나눠봤습니다), API 호출 컴포넌트, export default function DetailSectionBottom() { diff --git a/src/components/DetailSectionBottom/ReviewItem.tsx b/src/components/DetailSectionBottom/ReviewItem.tsx index be5acb77..ae09f613 100644 --- a/src/components/DetailSectionBottom/ReviewItem.tsx +++ b/src/components/DetailSectionBottom/ReviewItem.tsx @@ -20,7 +20,7 @@ interface ItemProps { const Item: React.FC = (props: ItemProps) => { const { authorNickname, - authorProfileImageUrl, + // authorProfileImageUrl, rating, createdTime, content, diff --git a/src/components/DetailSectionBottom/index.tsx b/src/components/DetailSectionBottom/index.tsx index 2569a1b6..d1ca1b41 100644 --- a/src/components/DetailSectionBottom/index.tsx +++ b/src/components/DetailSectionBottom/index.tsx @@ -1,4 +1,3 @@ import DetailReviewStats from './DetailReviewStats'; -import DetailReview from './DetailReview'; -export { DetailReviewStats, DetailReview }; +export { DetailReviewStats }; diff --git a/src/components/Review/ReviewRating.tsx b/src/components/Review/ReviewRating.tsx index 095b379c..06da11cf 100644 --- a/src/components/Review/ReviewRating.tsx +++ b/src/components/Review/ReviewRating.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { StarIcon } from '@components/common/icons/Icons'; const ReviewRating = () => { diff --git a/src/main.tsx b/src/main.tsx index 5a5ade53..3de05f65 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -2,9 +2,9 @@ import ReactDOM from 'react-dom/client'; import App from './App.tsx'; import './index.css'; -if (import.meta.env.DEV) { - const { worker } = await import('./mocks/browser.ts'); - await worker.stop(); -} +// if (import.meta.env.DEV) { +// const { worker } = await import('./mocks/browser.ts'); +// await worker.stop(); +// } ReactDOM.createRoot(document.getElementById('root')!).render(); diff --git a/src/mocks/browser.ts b/src/mocks/browser.ts index 4726ecc8..df8e9011 100644 --- a/src/mocks/browser.ts +++ b/src/mocks/browser.ts @@ -1,4 +1,4 @@ -import { setupWorker } from 'msw'; -import { handlers } from './handlers'; +// import { setupWorker } from 'msw'; +// // import { handlers } from './handlers'; -export const worker = setupWorker(...handlers); \ No newline at end of file +// export const worker = setupWorker(...handlers); diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index 680adf17..05fe7d83 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -1,946 +1,944 @@ -import { rest } from 'msw'; +// import { rest } from 'msw'; -const SERVER_URL = import.meta.env.VITE_SERVER_URL; +// const SERVER_URL = import.meta.env.VITE_SERVER_URL; -export const handlers = [ - // 댓글 관련 API - - // 댓글 수정 - rest.put(`${SERVER_URL}/comments/:commentId`, (req, res, ctx) => { - const { commentId } = req.params; - const commentData = req.body; - const responseData = { - status: 0, - message: 'string', - data: { - commentId: commentId, - authorNickname: '은별', - authorProfileImageUrl: 'https://~~~.png', - content: commentData, - createdTime: '2023-12-28T15:12:40.231Z', - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 댓글 삭제 - rest.delete(`${SERVER_URL}/comments/:commentId`, (req, res, ctx) => { - const { commentId } = req.params; - const responseData = { - status: 0, - message: `댓글 삭제 성공, commentId: ${commentId}`, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 댓글 작성 - rest.post(`${SERVER_URL}/comments`, (req, res, ctx) => { - const { commentId } = req.params; - const commentData = req.body; - const responseData = { - status: 0, - message: 'string', - data: { - commentId: commentId, - authorNickname: '은별', - authorProfileImageUrl: 'https://~~~.png', - content: commentData, - createdTime: '2023-12-28T15:15:48.041Z', - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 리뷰 관련 API - // 리뷰 수정 - rest.put(`${SERVER_URL}/reviews/:reviewId`, (req, res, ctx) => { - const { reviewId } = req.params; - const reviewData = req.body as ReviewRequest; - const responseData = reviewData; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 리뷰 삭제 - rest.delete(`${SERVER_URL}/reviews/:reviewId`, (req, res, ctx) => { - const { reviewId } = req.params; - return res( - ctx.status(200), - ctx.json({ message: `리뷰 ${reviewId} 삭제 성공` }), - ); - }), - // 리뷰 작성 - rest.post(`${SERVER_URL}/reviews`, (req, res, ctx) => { - const { reviewId } = req.params; - const reviewData = req.body as ReviewRequest; - const responseData = { - status: 0, - message: 'string', - data: { - reviewId: reviewId, - authorNickname: '은별', - authorProfileImageUrl: 'https://~~~.png', - rating: 4, - createdTime: '2023-12-28T16:24:09.639Z', - content: '~~~여서 ~~~ 해서 ~~로 좋았습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 리뷰 댓글 조회 - rest.get(`${SERVER_URL}/reviews/:reviewId/comments`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - comments: [ - { - commentId: 1, - authorNickname: '은별', - authorProfileImageUrl: 'https://~~~.png', - content: '잘보고 갑니다~', - createdTime: '2023-12-28T16:29:34.105Z', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 리뷰 키워드 조회 - rest.get(`${SERVER_URL}/reviews/keywords`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 여정 관련 API - // 나의 여정 목록 조회 - rest.get(`${SERVER_URL}/trips`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - trips: [ - { - tripId: 1, - tripName: '나의 ~번째 여정', - startDate: '2023-12-28', - endDate: '2023-12-28', - numberOfTripMembers: 2, - tripStatus: '여행 전', - tripThumbnailUrl: 'https://~~~~.png', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 여정 생성 - rest.post(`${SERVER_URL}/trips`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - tripId: 1, - tripName: '나의 ~번째 여정', - startDate: '2023-12-28', - endDate: '2023-12-28', - numberOfTripMembers: 2, - tripStatus: '여행 전', - tripThumbnailUrl: 'https://~~~~.png', - }, - }; - return res(ctx.status(201), ctx.json(responseData)); - }), - // 여정 탈퇴 - rest.delete(`${SERVER_URL}/trips/:tripId`, (req, res, ctx) => { - const { tripId } = req.params; - return res( - ctx.status(200), - ctx.json({ message: `여행 ${tripId} 탈퇴 성공` }), - ); - }), - // 여행지 관련 API - // 인기 여행지 조회 - rest.get(`${SERVER_URL}/tours`, (req, res, ctx) => { - const { page, size } = req.params; - const responseData = { - status: 0, - message: 'string', - data: { - totalPages: 0, - totalElements: 0, - pageable: { - pageNumber: page, - pageSize: size, - offset: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - paged: true, - unpaged: true, - }, - size: size, // 확인필요 - content: [ - { - id: 1, - title: '여행지 이름', - ratingAverage: 4.5, - reviewCount: 100, - likedCount: 100, - liked: false, - smallThumbnailUrl: 'http://~~~~~~image.jpg', - }, - ], - number: page, // 확인필요 - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - numberOfElements: 0, - first: true, - last: true, - empty: true, - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 여행지 상세 조회 - rest.get(`${SERVER_URL}/tours/:tourItemId`, (req, res, ctx) => { - const { tourId } = req.params; - const responseData = { - status: 0, - message: 'string', - data: { - id: tourId, - title: '여행지 이름', - liked: false, - fullAddress: 'OO시/도 OO구/군 OO로/길 OOO', - zipcode: '00000', - longitude: '127.04', - latitude: '33.56', - tel: '010-0000-0000', - originalThumbnailUrl: 'http://~~~~~~image.jpg', - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 여행지 검색 - rest.get(`${SERVER_URL}/tours/search`, (req, res, ctx) => { - const { page, size } = req.params; - const responseData = { - status: 0, - message: 'string', - data: { - totalPages: 0, - totalElements: 0, - pageable: { - pageNumber: page, - pageSize: size, - offset: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - paged: true, - unpaged: true, - }, - size: size, // 확인필요 - content: [ - { - id: 1, - title: '여행지 이름', - ratingAverage: 4.5, - reviewCount: 100, - likedCount: 100, - liked: false, - smallThumbnailUrl: 'http://~~~~~~image.jpg', - }, - ], - number: page, // 확인필요 - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - numberOfElements: 0, - first: true, - last: true, - empty: true, - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 유저 관련 API - // 회원 정보 조회 - rest.get(`${SERVER_URL}/member`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - memberId: 1, - nickname: '닉네임', - email: 'example@mail.com', - profileImageUrl: '프로필 이미지', - ageType: '연령대', - genderType: '성별', - survey: '설문조사 결과', - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 회원 정보 수정 - rest.put(`${SERVER_URL}/member`, (req, res, ctx) => { - const memberData = req.body as MemberRequest; - const responseData = { - status: 0, - message: 'string', - data: { - memberId: 1, - nickname: memberData.nickname, - email: 'example@mail.com', - profileImageUrl: memberData.profileImageUrl, - ageType: '연령대', - genderType: '성별', - survey: memberData.survey, - }, - }; - return res( - ctx.status(200), - ctx.json({ - message: `회원 정보 수정 성공, 비밀번호:${memberData.password}`, - responseData, - }), - ); - }), - // 회원 탈퇴 - rest.delete(`${SERVER_URL}/member`, (req, res, ctx) => { - return res(ctx.status(200), ctx.json({ message: '회원 탈퇴 성공' })); - }), - // 나의 여정 조회 - rest.get(`${SERVER_URL}/member/trips`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - totalPages: 0, - totalElements: 0, - pageable: { - pageNumber: 0, - pageSize: 0, - offset: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - paged: true, - unpaged: true, - }, - size: 0, - content: [ - { - tripId: 1, - tripName: '나의 ~번째 여정', - startDate: '2023-12-28', - endDate: '2023-12-28', - numberOfTripMembers: 2, - tripStatus: '여행 전', - tripThumbnailUrl: 'https://~~~~.png', - }, - ], - number: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - numberOfElements: 0, - first: true, - last: true, - empty: true, - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 나의 관심 여행지 조회 - rest.get(`${SERVER_URL}/member/tours`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - totalPages: 0, - totalElements: 0, - pageable: { - pageNumber: 0, - pageSize: 0, - offset: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - paged: true, - unpaged: true, - }, - size: 0, - content: [ - { - id: 1, - title: '여행지 이름', - ratingAverage: 4.5, - reviewCount: 100, - likedCount: 100, - liked: false, - smallThumbnailUrl: 'http://~~~~~~image.jpg', - }, - ], - number: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - numberOfElements: 0, - first: true, - last: true, - empty: true, - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 나의 리뷰 조회 - rest.get(`${SERVER_URL}/member/reviews`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - totalPages: 0, - totalElements: 0, - pageable: { - pageNumber: 0, - pageSize: 0, - offset: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - paged: true, - unpaged: true, - }, - size: 0, - content: [ - { - reviewId: 1, - authorNickname: '은별', - authorProfileImageUrl: 'https://~~~.png', - rating: 4, - createdTime: '2023-12-28T16:15:43.756Z', - content: '~~~여서 ~~~ 해서 ~~로 좋았습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - }, - ], - number: 0, - sort: { - sorted: true, - empty: true, - unsorted: true, - }, - numberOfElements: 0, - first: true, - last: true, - empty: true, - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 나의 관심 여행지 삭제 - rest.delete(`${SERVER_URL}/member/tours/:tourId`, (req, res, ctx) => { - const { tourId } = req.params; - return res( - ctx.status(200), - ctx.json({ message: `관심 여행지 ${tourId} 삭제 성공` }), - ); - }), - // 인증 관련 API - // 회원가입 - rest.post(`${SERVER_URL}/auth/signup`, (req, res, ctx) => { - const authData = req.body as AuthRequest; - return res( - ctx.status(200), - ctx.json({ message: '회원가입 성공', authData }), - ); - }), - // 로그아웃 - rest.post(`${SERVER_URL}/auth/logout`, (req, res, ctx) => { - return res(ctx.status(200), ctx.json({ message: '로그아웃 성공' })); - }), - // 이메일 로그인 - rest.post(`${SERVER_URL}/auth/login`, (req, res, ctx) => { - const loginData = req.body; - const responseData = { - status: 0, - message: 'string', - data: { - token: 'jwtToken', - }, - }; - return res( - ctx.status(200), - ctx.json({ message: '로그인 성공', loginData, responseData }), - ); - }), - // 카카오 로그인 - rest.post(`${SERVER_URL}/auth/login/kakao`, (req, res, ctx) => { - const loginData = req.body; - const responseData = { - status: 0, - message: 'string', - data: { - token: 'jwtToken', - }, - }; - return res( - ctx.status(200), - ctx.json({ message: '카카오 로그인 성공', loginData, responseData }), - ); - }), - // 닉네임 중복조회 - rest.get(`${SERVER_URL}/auth/nicknames/check/:nickname`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - exists: true, - }, - }; - return res( - ctx.status(200), - ctx.json({ message: '닉네임 중복조회 완료', responseData }), - ); - }), - // 이메일 중복조회 - rest.get(`${SERVER_URL}/auth/emails/check/:email`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - exists: true, - }, - }; - return res( - ctx.status(200), - ctx.json({ message: '이메일 중복조회 완료', responseData }), - ); - }), - // 지역 관련 API - // 전체 지역 조회 - rest.get(`${SERVER_URL}/region`, (req, res, ctx) => { - const areaCode = req.url.searchParams.get('areaCode'); - const responseData = { - status: 0, - message: 'string', - data: { - regions: [ - { - areaCode: areaCode, // 확인필요 - subAreaCode: 0, - name: '서울시', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 인기 지역 조회 - rest.get(`${SERVER_URL}/region/popular`, (req, res, ctx) => { - const responseData = { - status: 0, - message: 'string', - data: { - regions: [ - { - areaCode: 1, - subAreaCode: 0, - name: '서울시', - }, - ], - }, - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 카테고리 관련 API - // 카테고리 조회 - rest.get(`${SERVER_URL}/category`, (req, res, ctx) => { - // 모의 카테고리 데이터 - const responseData = { - status: 0, - message: 'string', - data: [ - { - code: 39, - name: '식당', - }, - ], - }; - return res(ctx.status(200), ctx.json(responseData)); - }), - // 여행 상품 리뷰 조회 - rest.get(`${SERVER_URL}/tours/:tourItemId/reviews`, (req, res, ctx) => { - const responseData = { - status: 200, - message: 'SUCCESS', - data: { - ratingAverage: 4.125, - reviewTotalCount: 8, - keywordTotalCount: 38, - reviewInfos: { - content: [ - { - reviewId: 15, - authorNickname: '익명 사용자1', - authorProfileImageUrl: - 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', - rating: 4, - createdTime: '2023-12-30T20:02:06.03406', - content: '좋은 여행지였습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - commentCount: 0, - }, - { - reviewId: 23, - authorNickname: '익명 사용자1', - authorProfileImageUrl: - 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', - rating: 4, - createdTime: '2023-12-30T20:03:17.978397', - content: '좋은 여행지였습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - commentCount: 0, - }, - { - reviewId: 24, - authorNickname: '익명 사용자1', - authorProfileImageUrl: - 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', - rating: 4, - createdTime: '2023-12-30T20:03:18.970952', - content: '좋은 여행지였습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - commentCount: 0, - }, - { - reviewId: 25, - authorNickname: '익명 사용자1', - authorProfileImageUrl: - 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', - rating: 4, - createdTime: '2023-12-30T20:03:20.335173', - content: '좋은 여행지였습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - commentCount: 0, - }, - { - reviewId: 26, - authorNickname: '익명 사용자1', - authorProfileImageUrl: - 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', - rating: 4, - createdTime: '2023-12-30T20:03:21.924918', - content: '좋은 여행지였습니다.', - keywords: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - }, - ], - commentCount: 0, - }, - ], - pageable: { - pageNumber: 0, - pageSize: 20, - sort: { - sorted: false, - empty: true, - unsorted: true, - }, - offset: 0, - paged: true, - unpaged: false, - }, - last: true, - totalElements: 5, - totalPages: 1, - size: 20, - number: 0, - sort: { - sorted: false, - empty: true, - unsorted: true, - }, - first: true, - numberOfElements: 5, - empty: false, - }, - tourKeywordInfos: [ - { - keywordId: 1, - content: '깨끗해요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 30, - }, - { - keywordId: 2, - content: '친절해요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 29, - }, - { - keywordId: 3, - content: '뷰가 좋아요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 28, - }, - { - keywordId: 4, - content: '침구가 좋아요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 27, - }, - { - keywordId: 5, - content: '주차하기 편해요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 26, - }, - { - keywordId: 6, - content: '냉난방이 잘돼요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 25, - }, - { - keywordId: 7, - content: '대중교통이 편해요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 24, - }, - { - keywordId: 8, - content: '호캉스하기 좋아요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 23, - }, - { - keywordId: 9, - content: '조식이 맛있어요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 22, - }, - { - keywordId: 10, - content: '사진 찍기 좋아요', - type: 'ACCOMMODATION_KEYWORD', - keywordCount: 21, - }, - { - keywordId: 11, - content: '음식이 맛있어요', - type: 'DINING_KEYWORD', - keywordCount: 20, - }, - { - keywordId: 12, - content: '친절해요', - type: 'DINING_KEYWORD', - keywordCount: 19, - }, - { - keywordId: 13, - content: '인테리어가 멋져요', - type: 'DINING_KEYWORD', - keywordCount: 18, - }, - { - keywordId: 14, - content: '매장이 청결해요', - type: 'DINING_KEYWORD', - keywordCount: 17, - }, - { - keywordId: 15, - content: '특별한 메뉴가 있어요', - type: 'DINING_KEYWORD', - keywordCount: 16, - }, - { - keywordId: 16, - content: '가성비가 좋아요', - type: 'DINING_KEYWORD', - keywordCount: 15, - }, - { - keywordId: 17, - content: '재료가 신선해요', - type: 'DINING_KEYWORD', - keywordCount: 14, - }, - { - keywordId: 18, - content: '사진찍기 좋아요', - type: 'DINING_KEYWORD', - keywordCount: 13, - }, - { - keywordId: 19, - content: '주차하기 편해요', - type: 'DINING_KEYWORD', - keywordCount: 12, - }, - { - keywordId: 20, - content: '화장실이 깨끗해요', - type: 'DINING_KEYWORD', - keywordCount: 11, - }, - { - keywordId: 21, - content: '사진이 잘 나와요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 10, - }, - { - keywordId: 22, - content: '뷰가 좋아요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 9, - }, - { - keywordId: 23, - content: '관리가 잘 되어있어요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 8, - }, - { - keywordId: 24, - content: '볼거리가 많아요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 7, - }, - { - keywordId: 25, - content: '편의시설이 잘 되어 있어요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 6, - }, - { - keywordId: 26, - content: '대중교통이 편해요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 5, - }, - { - keywordId: 27, - content: '주차하기 편해요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 4, - }, - { - keywordId: 28, - content: '화장실이 깨끗해요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 3, - }, - { - keywordId: 29, - content: '가격이 합리적이에요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 2, - }, - { - keywordId: 30, - content: '방문객이 많아요', - type: 'ATTRACTION_KEYWORD', - keywordCount: 1, - }, - ], - }, - }; - - return res(ctx.status(200), ctx.json(responseData)); - }), -]; +// export const handlers = [ +// // 댓글 관련 API +// // 댓글 수정 +// rest.put(`${SERVER_URL}/comments/:commentId`, (req, res, ctx) => { +// const { commentId } = req.params; +// const commentData = req.body; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// commentId: commentId, +// authorNickname: '은별', +// authorProfileImageUrl: 'https://~~~.png', +// content: commentData, +// createdTime: '2023-12-28T15:12:40.231Z', +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 댓글 삭제 +// rest.delete(`${SERVER_URL}/comments/:commentId`, (req, res, ctx) => { +// const { commentId } = req.params; +// const responseData = { +// status: 0, +// message: `댓글 삭제 성공, commentId: ${commentId}`, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 댓글 작성 +// rest.post(`${SERVER_URL}/comments`, (req, res, ctx) => { +// const { commentId } = req.params; +// const commentData = req.body; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// commentId: commentId, +// authorNickname: '은별', +// authorProfileImageUrl: 'https://~~~.png', +// content: commentData, +// createdTime: '2023-12-28T15:15:48.041Z', +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 리뷰 관련 API +// // 리뷰 수정 +// rest.put(`${SERVER_URL}/reviews/:reviewId`, (req, res, ctx) => { +// const { reviewId } = req.params; +// const reviewData = req.body as ReviewRequest; +// const responseData = reviewData; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 리뷰 삭제 +// rest.delete(`${SERVER_URL}/reviews/:reviewId`, (req, res, ctx) => { +// const { reviewId } = req.params; +// return res( +// ctx.status(200), +// ctx.json({ message: `리뷰 ${reviewId} 삭제 성공` }), +// ); +// }), +// // 리뷰 작성 +// rest.post(`${SERVER_URL}/reviews`, (req, res, ctx) => { +// const { reviewId } = req.params; +// const reviewData = req.body as ReviewRequest; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// reviewId: reviewId, +// authorNickname: '은별', +// authorProfileImageUrl: 'https://~~~.png', +// rating: 4, +// createdTime: '2023-12-28T16:24:09.639Z', +// content: '~~~여서 ~~~ 해서 ~~로 좋았습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 리뷰 댓글 조회 +// rest.get(`${SERVER_URL}/reviews/:reviewId/comments`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// comments: [ +// { +// commentId: 1, +// authorNickname: '은별', +// authorProfileImageUrl: 'https://~~~.png', +// content: '잘보고 갑니다~', +// createdTime: '2023-12-28T16:29:34.105Z', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 리뷰 키워드 조회 +// rest.get(`${SERVER_URL}/reviews/keywords`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 여정 관련 API +// // 나의 여정 목록 조회 +// rest.get(`${SERVER_URL}/trips`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// trips: [ +// { +// tripId: 1, +// tripName: '나의 ~번째 여정', +// startDate: '2023-12-28', +// endDate: '2023-12-28', +// numberOfTripMembers: 2, +// tripStatus: '여행 전', +// tripThumbnailUrl: 'https://~~~~.png', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 여정 생성 +// rest.post(`${SERVER_URL}/trips`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// tripId: 1, +// tripName: '나의 ~번째 여정', +// startDate: '2023-12-28', +// endDate: '2023-12-28', +// numberOfTripMembers: 2, +// tripStatus: '여행 전', +// tripThumbnailUrl: 'https://~~~~.png', +// }, +// }; +// return res(ctx.status(201), ctx.json(responseData)); +// }), +// // 여정 탈퇴 +// rest.delete(`${SERVER_URL}/trips/:tripId`, (req, res, ctx) => { +// const { tripId } = req.params; +// return res( +// ctx.status(200), +// ctx.json({ message: `여행 ${tripId} 탈퇴 성공` }), +// ); +// }), +// // 여행지 관련 API +// // 인기 여행지 조회 +// rest.get(`${SERVER_URL}/tours`, (req, res, ctx) => { +// const { page, size } = req.params; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// totalPages: 0, +// totalElements: 0, +// pageable: { +// pageNumber: page, +// pageSize: size, +// offset: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// paged: true, +// unpaged: true, +// }, +// size: size, // 확인필요 +// content: [ +// { +// id: 1, +// title: '여행지 이름', +// ratingAverage: 4.5, +// reviewCount: 100, +// likedCount: 100, +// liked: false, +// smallThumbnailUrl: 'http://~~~~~~image.jpg', +// }, +// ], +// number: page, // 확인필요 +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// numberOfElements: 0, +// first: true, +// last: true, +// empty: true, +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 여행지 상세 조회 +// rest.get(`${SERVER_URL}/tours/:tourItemId`, (req, res, ctx) => { +// const { tourId } = req.params; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// id: tourId, +// title: '여행지 이름', +// liked: false, +// fullAddress: 'OO시/도 OO구/군 OO로/길 OOO', +// zipcode: '00000', +// longitude: '127.04', +// latitude: '33.56', +// tel: '010-0000-0000', +// originalThumbnailUrl: 'http://~~~~~~image.jpg', +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 여행지 검색 +// rest.get(`${SERVER_URL}/tours/search`, (req, res, ctx) => { +// const { page, size } = req.params; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// totalPages: 0, +// totalElements: 0, +// pageable: { +// pageNumber: page, +// pageSize: size, +// offset: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// paged: true, +// unpaged: true, +// }, +// size: size, // 확인필요 +// content: [ +// { +// id: 1, +// title: '여행지 이름', +// ratingAverage: 4.5, +// reviewCount: 100, +// likedCount: 100, +// liked: false, +// smallThumbnailUrl: 'http://~~~~~~image.jpg', +// }, +// ], +// number: page, // 확인필요 +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// numberOfElements: 0, +// first: true, +// last: true, +// empty: true, +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 유저 관련 API +// // 회원 정보 조회 +// rest.get(`${SERVER_URL}/member`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// memberId: 1, +// nickname: '닉네임', +// email: 'example@mail.com', +// profileImageUrl: '프로필 이미지', +// ageType: '연령대', +// genderType: '성별', +// survey: '설문조사 결과', +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 회원 정보 수정 +// rest.put(`${SERVER_URL}/member`, (req, res, ctx) => { +// const memberData = req.body as MemberRequest; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// memberId: 1, +// nickname: memberData.nickname, +// email: 'example@mail.com', +// profileImageUrl: memberData.profileImageUrl, +// ageType: '연령대', +// genderType: '성별', +// survey: memberData.survey, +// }, +// }; +// return res( +// ctx.status(200), +// ctx.json({ +// message: `회원 정보 수정 성공, 비밀번호:${memberData.password}`, +// responseData, +// }), +// ); +// }), +// // 회원 탈퇴 +// rest.delete(`${SERVER_URL}/member`, (req, res, ctx) => { +// return res(ctx.status(200), ctx.json({ message: '회원 탈퇴 성공' })); +// }), +// // 나의 여정 조회 +// rest.get(`${SERVER_URL}/member/trips`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// totalPages: 0, +// totalElements: 0, +// pageable: { +// pageNumber: 0, +// pageSize: 0, +// offset: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// paged: true, +// unpaged: true, +// }, +// size: 0, +// content: [ +// { +// tripId: 1, +// tripName: '나의 ~번째 여정', +// startDate: '2023-12-28', +// endDate: '2023-12-28', +// numberOfTripMembers: 2, +// tripStatus: '여행 전', +// tripThumbnailUrl: 'https://~~~~.png', +// }, +// ], +// number: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// numberOfElements: 0, +// first: true, +// last: true, +// empty: true, +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 나의 관심 여행지 조회 +// rest.get(`${SERVER_URL}/member/tours`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// totalPages: 0, +// totalElements: 0, +// pageable: { +// pageNumber: 0, +// pageSize: 0, +// offset: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// paged: true, +// unpaged: true, +// }, +// size: 0, +// content: [ +// { +// id: 1, +// title: '여행지 이름', +// ratingAverage: 4.5, +// reviewCount: 100, +// likedCount: 100, +// liked: false, +// smallThumbnailUrl: 'http://~~~~~~image.jpg', +// }, +// ], +// number: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// numberOfElements: 0, +// first: true, +// last: true, +// empty: true, +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 나의 리뷰 조회 +// rest.get(`${SERVER_URL}/member/reviews`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// totalPages: 0, +// totalElements: 0, +// pageable: { +// pageNumber: 0, +// pageSize: 0, +// offset: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// paged: true, +// unpaged: true, +// }, +// size: 0, +// content: [ +// { +// reviewId: 1, +// authorNickname: '은별', +// authorProfileImageUrl: 'https://~~~.png', +// rating: 4, +// createdTime: '2023-12-28T16:15:43.756Z', +// content: '~~~여서 ~~~ 해서 ~~로 좋았습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// }, +// ], +// number: 0, +// sort: { +// sorted: true, +// empty: true, +// unsorted: true, +// }, +// numberOfElements: 0, +// first: true, +// last: true, +// empty: true, +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 나의 관심 여행지 삭제 +// rest.delete(`${SERVER_URL}/member/tours/:tourId`, (req, res, ctx) => { +// const { tourId } = req.params; +// return res( +// ctx.status(200), +// ctx.json({ message: `관심 여행지 ${tourId} 삭제 성공` }), +// ); +// }), +// // 인증 관련 API +// // 회원가입 +// rest.post(`${SERVER_URL}/auth/signup`, (req, res, ctx) => { +// const authData = req.body as AuthRequest; +// return res( +// ctx.status(200), +// ctx.json({ message: '회원가입 성공', authData }), +// ); +// }), +// // 로그아웃 +// rest.post(`${SERVER_URL}/auth/logout`, (req, res, ctx) => { +// return res(ctx.status(200), ctx.json({ message: '로그아웃 성공' })); +// }), +// // 이메일 로그인 +// rest.post(`${SERVER_URL}/auth/login`, (req, res, ctx) => { +// const loginData = req.body; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// token: 'jwtToken', +// }, +// }; +// return res( +// ctx.status(200), +// ctx.json({ message: '로그인 성공', loginData, responseData }), +// ); +// }), +// // 카카오 로그인 +// rest.post(`${SERVER_URL}/auth/login/kakao`, (req, res, ctx) => { +// const loginData = req.body; +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// token: 'jwtToken', +// }, +// }; +// return res( +// ctx.status(200), +// ctx.json({ message: '카카오 로그인 성공', loginData, responseData }), +// ); +// }), +// // 닉네임 중복조회 +// rest.get(`${SERVER_URL}/auth/nicknames/check/:nickname`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// exists: true, +// }, +// }; +// return res( +// ctx.status(200), +// ctx.json({ message: '닉네임 중복조회 완료', responseData }), +// ); +// }), +// // 이메일 중복조회 +// rest.get(`${SERVER_URL}/auth/emails/check/:email`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// exists: true, +// }, +// }; +// return res( +// ctx.status(200), +// ctx.json({ message: '이메일 중복조회 완료', responseData }), +// ); +// }), +// // 지역 관련 API +// // 전체 지역 조회 +// rest.get(`${SERVER_URL}/region`, (req, res, ctx) => { +// const areaCode = req.url.searchParams.get('areaCode'); +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// regions: [ +// { +// areaCode: areaCode, // 확인필요 +// subAreaCode: 0, +// name: '서울시', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 인기 지역 조회 +// rest.get(`${SERVER_URL}/region/popular`, (req, res, ctx) => { +// const responseData = { +// status: 0, +// message: 'string', +// data: { +// regions: [ +// { +// areaCode: 1, +// subAreaCode: 0, +// name: '서울시', +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 카테고리 관련 API +// // 카테고리 조회 +// rest.get(`${SERVER_URL}/category`, (req, res, ctx) => { +// // 모의 카테고리 데이터 +// const responseData = { +// status: 0, +// message: 'string', +// data: [ +// { +// code: 39, +// name: '식당', +// }, +// ], +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// // 여행 상품 리뷰 조회 +// rest.get(`${SERVER_URL}/tours/:tourItemId/reviews`, (req, res, ctx) => { +// const responseData = { +// status: 200, +// message: 'SUCCESS', +// data: { +// ratingAverage: 4.125, +// reviewTotalCount: 8, +// keywordTotalCount: 38, +// reviewInfos: { +// content: [ +// { +// reviewId: 15, +// authorNickname: '익명 사용자1', +// authorProfileImageUrl: +// 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', +// rating: 4, +// createdTime: '2023-12-30T20:02:06.03406', +// content: '좋은 여행지였습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// commentCount: 0, +// }, +// { +// reviewId: 23, +// authorNickname: '익명 사용자1', +// authorProfileImageUrl: +// 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', +// rating: 4, +// createdTime: '2023-12-30T20:03:17.978397', +// content: '좋은 여행지였습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// commentCount: 0, +// }, +// { +// reviewId: 24, +// authorNickname: '익명 사용자1', +// authorProfileImageUrl: +// 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', +// rating: 4, +// createdTime: '2023-12-30T20:03:18.970952', +// content: '좋은 여행지였습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// commentCount: 0, +// }, +// { +// reviewId: 25, +// authorNickname: '익명 사용자1', +// authorProfileImageUrl: +// 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', +// rating: 4, +// createdTime: '2023-12-30T20:03:20.335173', +// content: '좋은 여행지였습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// commentCount: 0, +// }, +// { +// reviewId: 26, +// authorNickname: '익명 사용자1', +// authorProfileImageUrl: +// 'https://common.hanmi.co.kr/upfile/ces/product/p_2011_tenten_p_400.jpg', +// rating: 4, +// createdTime: '2023-12-30T20:03:21.924918', +// content: '좋은 여행지였습니다.', +// keywords: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// }, +// ], +// commentCount: 0, +// }, +// ], +// pageable: { +// pageNumber: 0, +// pageSize: 20, +// sort: { +// sorted: false, +// empty: true, +// unsorted: true, +// }, +// offset: 0, +// paged: true, +// unpaged: false, +// }, +// last: true, +// totalElements: 5, +// totalPages: 1, +// size: 20, +// number: 0, +// sort: { +// sorted: false, +// empty: true, +// unsorted: true, +// }, +// first: true, +// numberOfElements: 5, +// empty: false, +// }, +// tourKeywordInfos: [ +// { +// keywordId: 1, +// content: '깨끗해요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 30, +// }, +// { +// keywordId: 2, +// content: '친절해요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 29, +// }, +// { +// keywordId: 3, +// content: '뷰가 좋아요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 28, +// }, +// { +// keywordId: 4, +// content: '침구가 좋아요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 27, +// }, +// { +// keywordId: 5, +// content: '주차하기 편해요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 26, +// }, +// { +// keywordId: 6, +// content: '냉난방이 잘돼요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 25, +// }, +// { +// keywordId: 7, +// content: '대중교통이 편해요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 24, +// }, +// { +// keywordId: 8, +// content: '호캉스하기 좋아요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 23, +// }, +// { +// keywordId: 9, +// content: '조식이 맛있어요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 22, +// }, +// { +// keywordId: 10, +// content: '사진 찍기 좋아요', +// type: 'ACCOMMODATION_KEYWORD', +// keywordCount: 21, +// }, +// { +// keywordId: 11, +// content: '음식이 맛있어요', +// type: 'DINING_KEYWORD', +// keywordCount: 20, +// }, +// { +// keywordId: 12, +// content: '친절해요', +// type: 'DINING_KEYWORD', +// keywordCount: 19, +// }, +// { +// keywordId: 13, +// content: '인테리어가 멋져요', +// type: 'DINING_KEYWORD', +// keywordCount: 18, +// }, +// { +// keywordId: 14, +// content: '매장이 청결해요', +// type: 'DINING_KEYWORD', +// keywordCount: 17, +// }, +// { +// keywordId: 15, +// content: '특별한 메뉴가 있어요', +// type: 'DINING_KEYWORD', +// keywordCount: 16, +// }, +// { +// keywordId: 16, +// content: '가성비가 좋아요', +// type: 'DINING_KEYWORD', +// keywordCount: 15, +// }, +// { +// keywordId: 17, +// content: '재료가 신선해요', +// type: 'DINING_KEYWORD', +// keywordCount: 14, +// }, +// { +// keywordId: 18, +// content: '사진찍기 좋아요', +// type: 'DINING_KEYWORD', +// keywordCount: 13, +// }, +// { +// keywordId: 19, +// content: '주차하기 편해요', +// type: 'DINING_KEYWORD', +// keywordCount: 12, +// }, +// { +// keywordId: 20, +// content: '화장실이 깨끗해요', +// type: 'DINING_KEYWORD', +// keywordCount: 11, +// }, +// { +// keywordId: 21, +// content: '사진이 잘 나와요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 10, +// }, +// { +// keywordId: 22, +// content: '뷰가 좋아요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 9, +// }, +// { +// keywordId: 23, +// content: '관리가 잘 되어있어요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 8, +// }, +// { +// keywordId: 24, +// content: '볼거리가 많아요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 7, +// }, +// { +// keywordId: 25, +// content: '편의시설이 잘 되어 있어요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 6, +// }, +// { +// keywordId: 26, +// content: '대중교통이 편해요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 5, +// }, +// { +// keywordId: 27, +// content: '주차하기 편해요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 4, +// }, +// { +// keywordId: 28, +// content: '화장실이 깨끗해요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 3, +// }, +// { +// keywordId: 29, +// content: '가격이 합리적이에요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 2, +// }, +// { +// keywordId: 30, +// content: '방문객이 많아요', +// type: 'ATTRACTION_KEYWORD', +// keywordCount: 1, +// }, +// ], +// }, +// }; +// return res(ctx.status(200), ctx.json(responseData)); +// }), +// ]; From 185079cb1ad244b0ac07f3b9df0b2ebae45da635 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:39:33 +0900 Subject: [PATCH 08/33] =?UTF-8?q?Deploy:=20preview=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/preview.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 00000000..26539ae2 --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,21 @@ +name: GitHub Actions Vercel Preview Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches-ignore: + - main +jobs: + Deploy-Preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vercel CLI + run: npm install --global vercel@canary + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} From 34ec5bb383e2b988d5e16aad79e5837f6a74727d Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:45:47 +0900 Subject: [PATCH 09/33] =?UTF-8?q?Deploy:=20preview=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 26539ae2..bdf86495 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -19,3 +19,17 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' # 또는 원하는 버전 + - name: Install pnpm + run: npm install -g pnpm + - name: Install dependencies + run: pnpm install + - name: Build + run: vercel build --token ${{ secrets.VERCEL_TOKEN }} From 7e783ab49276d17bff24fbbbb2703198bcf8bbc1 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:51:04 +0900 Subject: [PATCH 10/33] =?UTF-8?q?Deploy:=20preview=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index bdf86495..4f0be09a 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -13,23 +13,11 @@ jobs: - uses: actions/checkout@v3 - name: Install Vercel CLI run: npm install --global vercel@canary + - name: Install pnpm + run: npm install -g pnpm - name: Pull Vercel Environment Information run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' # 또는 원하는 버전 - - name: Install pnpm - run: npm install -g pnpm - - name: Install dependencies - run: pnpm install - - name: Build - run: vercel build --token ${{ secrets.VERCEL_TOKEN }} From ddf844599418fb140a2e96201513114780aebabd Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:08:15 +0900 Subject: [PATCH 11/33] =?UTF-8?q?Deploy:=20preview=20on=20=EC=9E=AC?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 7 +++++-- .github/workflows/production.yaml | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/production.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 4f0be09a..72421852 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -4,8 +4,11 @@ env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: push: - branches-ignore: - - main + branches: + - dev + pull_request: + types: + - opened jobs: Deploy-Preview: runs-on: ubuntu-latest diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml new file mode 100644 index 00000000..fff08a6c --- /dev/null +++ b/.github/workflows/production.yaml @@ -0,0 +1,22 @@ +name: Vercel Production Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ + secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} From d21900b4f195a7e48f2cbc6e67fbae839fcacfcb Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:10:34 +0900 Subject: [PATCH 12/33] =?UTF-8?q?Deploy:=20readme=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5166a8dc..77fa0b13 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ ## 📝 프로젝트 소개 + 여정공유 여행플랫폼 ## 📖 Commit convention + - Feat : 새로운 기능 추가 - Fix : 버그 수정 - Env : 개발 환경 관련 설정 @@ -13,4 +15,4 @@ - Test : 테스트 추가/수정 - Chore : 빌드 관련 코드 수정 - Rename : 파일 및 폴더명 수정 -- Remove : 파일 삭제 +- Remove : 파일 삭제. From 72138a8bde89db33716a2b4a8de40728fae6d794 Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 18:24:45 +0900 Subject: [PATCH 13/33] =?UTF-8?q?Chore:=20=EA=B9=83=ED=97=99=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77fa0b13..52cde81a 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,5 @@ - Docs : 내부 문서 추가/수정 - Test : 테스트 추가/수정 - Chore : 빌드 관련 코드 수정 -- Rename : 파일 및 폴더명 수정 +- Rename : 파일 및 폴더명 수정. - Remove : 파일 삭제. From c69840c5e9d964ca2905ac6663f95945ee07c2a4 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:34:43 +0900 Subject: [PATCH 14/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 72421852..95fcdf83 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -24,3 +24,5 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + - name: Alias Deployment to Custom Domain + run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} https://weplanplans-dev.vercel.app/ From b567d2a51138e23de7ebc89c66d720730efba587 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:38:50 +0900 Subject: [PATCH 15/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 95fcdf83..a742f43e 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -25,4 +25,4 @@ jobs: - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - name: Alias Deployment to Custom Domain - run: vercel alias --token=${{ secrets.VERCEL_TOKEN }} https://weplanplans-dev.vercel.app/ + run: vercel alias [https://weplanplans-dev.vercel.app/] your-custom-domain.com --token=${{ secrets.VERCEL_TOKEN }} From b26721f857bb72ff6fbcac7af5cc53e2197949e1 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:41:21 +0900 Subject: [PATCH 16/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index a742f43e..edf81df2 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -25,4 +25,4 @@ jobs: - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - name: Alias Deployment to Custom Domain - run: vercel alias [https://weplanplans-dev.vercel.app/] your-custom-domain.com --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias https://weplanplans-dev.vercel.app/ your-custom-domain.com --token=${{ secrets.VERCEL_TOKEN }} From 0871b00dfafd22d6717f895b50e190d013954d98 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:43:20 +0900 Subject: [PATCH 17/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index edf81df2..498e78df 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -23,6 +23,9 @@ jobs: - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + id: deploy + run: | + DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + echo "::set-output name=url::$DEPLOY_URL" - name: Alias Deployment to Custom Domain - run: vercel alias https://weplanplans-dev.vercel.app/ your-custom-domain.com --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From b519a5e6e29d826957dac262e90c55374cba19b0 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:02:00 +0900 Subject: [PATCH 18/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 498e78df..fc9420ca 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -27,5 +27,5 @@ jobs: run: | DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') echo "::set-output name=url::$DEPLOY_URL" - - name: Alias Deployment to Custom Domain - run: vercel alias ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + - name: Alias Deployment to Fixed Domain + run: vercel alias ${{ steps.deploy.outputs.url }} weplanplans-dev.vercel.app --token=${{ secrets.VERCEL_TOKEN }} From 31edb24d1651053f9c84d10a06bca5d41bf186f5 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:22:23 +0900 Subject: [PATCH 19/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 7 +------ .github/workflows/production.yaml | 5 +++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index fc9420ca..72421852 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -23,9 +23,4 @@ jobs: - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - id: deploy - run: | - DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') - echo "::set-output name=url::$DEPLOY_URL" - - name: Alias Deployment to Fixed Domain - run: vercel alias ${{ steps.deploy.outputs.url }} weplanplans-dev.vercel.app --token=${{ secrets.VERCEL_TOKEN }} + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index fff08a6c..0f4bf1d7 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -14,9 +14,10 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ - secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Set Fixed Domain Alias + run: vercel alias set https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 8f3339e3cacb0431eb5062f145731b69a5577cac Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:35:24 +0900 Subject: [PATCH 20/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 ++ .github/workflows/production.yaml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 72421852..270f8342 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -7,6 +7,8 @@ on: branches: - dev pull_request: + branches-ignore: + - main types: - opened jobs: diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 0f4bf1d7..2fe27c70 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -3,7 +3,7 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - push: + pull_request: branches: - main jobs: @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - name: Install Vercel CLI run: npm install --global vercel@latest + - name: Install pnpm + run: npm install -g pnpm - name: Pull Vercel Environment Information run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts From 4c35418131f44542043beeafe89aa6a434c627cd Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:41:16 +0900 Subject: [PATCH 21/33] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 3 --- .github/workflows/production.yaml | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 270f8342..bbe26993 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -3,9 +3,6 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - push: - branches: - - dev pull_request: branches-ignore: - main diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 2fe27c70..7f14cdf2 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -20,6 +20,9 @@ jobs: - name: Build Project Artifacts run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + id: deploy + run: | + DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias - run: vercel alias set https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 1299fee9cadf5a6434c1da724add7c17b8460729 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:50:49 +0900 Subject: [PATCH 22/33] =?UTF-8?q?Deploy:=20production.ymal=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/production.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 7f14cdf2..18aae280 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -22,7 +22,7 @@ jobs: - name: Deploy Project Artifacts to Vercel id: deploy run: | - DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + DEPLOY_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 042f80cdcc4d111f373e5454c0f5083252adc3ee Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 19:55:13 +0900 Subject: [PATCH 23/33] =?UTF-8?q?Env:=20=EA=B9=83=ED=97=99=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/production.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 18aae280..d8ade6dc 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -1,4 +1,4 @@ -name: Vercel Production Deployment +name: GitHub Actions Vercel Preview Deployment env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} @@ -7,22 +7,19 @@ on: branches: - main jobs: - Deploy-Production: + Deploy-Preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Vercel CLI - run: npm install --global vercel@latest + run: npm install --global vercel@canary - name: Install pnpm run: npm install -g pnpm - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - id: deploy - run: | - DEPLOY_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') - echo "::set-output name=url::$DEPLOY_URL" + run: vercel deploy --token=${{ secrets.VERCEL_TOKEN }} - name: Set Fixed Domain Alias - run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias ${{ env.VERCEL_URL }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From d193751b9fdec94409d1d8edb5841f07f5fafea0 Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 20:04:22 +0900 Subject: [PATCH 24/33] =?UTF-8?q?Env:=20=EA=B9=83=ED=97=99=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/production.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index d8ade6dc..f9c1f42f 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -1,4 +1,4 @@ -name: GitHub Actions Vercel Preview Deployment +name: Vercel Production Deployment env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} @@ -7,19 +7,22 @@ on: branches: - main jobs: - Deploy-Preview: + Deploy-Production: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Vercel CLI - run: npm install --global vercel@canary + run: npm install --global vercel@latest - name: Install pnpm run: npm install -g pnpm - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --token=${{ secrets.VERCEL_TOKEN }} + id: deploy + run: | + DEPLOY_URL=$(vercel deploy --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias - run: vercel alias ${{ env.VERCEL_URL }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 39989527d780e299234a3479ba23cc824035203f Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 20:06:54 +0900 Subject: [PATCH 25/33] =?UTF-8?q?Env:=20=EA=B9=83=ED=97=99=EC=95=A1?= =?UTF-8?q?=EC=85=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52cde81a..77fa0b13 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,5 @@ - Docs : 내부 문서 추가/수정 - Test : 테스트 추가/수정 - Chore : 빌드 관련 코드 수정 -- Rename : 파일 및 폴더명 수정. +- Rename : 파일 및 폴더명 수정 - Remove : 파일 삭제. From 1836af36f9dc7935afcbf5f9e9e69b8d06307adc Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 20:26:33 +0900 Subject: [PATCH 26/33] =?UTF-8?q?Deploy:=20production.yaml=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 -- .github/workflows/production.yaml | 28 ---------------------------- 2 files changed, 30 deletions(-) delete mode 100644 .github/workflows/production.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index bbe26993..9e2190b8 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -4,8 +4,6 @@ env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: pull_request: - branches-ignore: - - main types: - opened jobs: diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml deleted file mode 100644 index 18aae280..00000000 --- a/.github/workflows/production.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Vercel Production Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - pull_request: - branches: - - main -jobs: - Deploy-Production: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Vercel CLI - run: npm install --global vercel@latest - - name: Install pnpm - run: npm install -g pnpm - - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy Project Artifacts to Vercel - id: deploy - run: | - DEPLOY_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') - echo "::set-output name=url::$DEPLOY_URL" - - name: Set Fixed Domain Alias - run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 36ae9053f5591d963174e49a5d1b2b7fb3a5f5bf Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 22:43:20 +0900 Subject: [PATCH 27/33] =?UTF-8?q?Env:=20dev=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/main/main.page.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/main/main.page.tsx b/src/pages/main/main.page.tsx index cc889053..5ad93232 100644 --- a/src/pages/main/main.page.tsx +++ b/src/pages/main/main.page.tsx @@ -3,6 +3,7 @@ import ToursSectionTop from '@components/Tours/ToursSectionTop'; const Main = () => { return ( <> +
dev 확인용
); From 62ef262d5a2b6e10d4becd4255df2623b4b1178c Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 23:04:28 +0900 Subject: [PATCH 28/33] =?UTF-8?q?Env:=20dev=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/main/main.page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/main/main.page.tsx b/src/pages/main/main.page.tsx index 5ad93232..55ea0926 100644 --- a/src/pages/main/main.page.tsx +++ b/src/pages/main/main.page.tsx @@ -3,7 +3,7 @@ import ToursSectionTop from '@components/Tours/ToursSectionTop'; const Main = () => { return ( <> -
dev 확인용
+
dev 브랜치 test
); From 933b48d5160c1cd3372c10755b94f4203440b8c2 Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 23:25:55 +0900 Subject: [PATCH 29/33] =?UTF-8?q?Chore:=20test=20=EB=AC=B8=EA=B5=AC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/main/main.page.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/main/main.page.tsx b/src/pages/main/main.page.tsx index 55ea0926..cc889053 100644 --- a/src/pages/main/main.page.tsx +++ b/src/pages/main/main.page.tsx @@ -3,7 +3,6 @@ import ToursSectionTop from '@components/Tours/ToursSectionTop'; const Main = () => { return ( <> -
dev 브랜치 test
); From 685ecfc63e79625c5eb25901d14c07a8873dc153 Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 23:35:58 +0900 Subject: [PATCH 30/33] =?UTF-8?q?Chore:=20dev=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77fa0b13..52cde81a 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,5 @@ - Docs : 내부 문서 추가/수정 - Test : 테스트 추가/수정 - Chore : 빌드 관련 코드 수정 -- Rename : 파일 및 폴더명 수정 +- Rename : 파일 및 폴더명 수정. - Remove : 파일 삭제. From a96bb130dab6ced1577c85799612d90e5b733898 Mon Sep 17 00:00:00 2001 From: sue Date: Thu, 4 Jan 2024 01:44:22 +0900 Subject: [PATCH 31/33] =?UTF-8?q?Design:=20=EC=97=AC=ED=96=89=EC=A7=80=20c?= =?UTF-8?q?ss=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tours/ToursItem.tsx | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/Tours/ToursItem.tsx b/src/components/Tours/ToursItem.tsx index bd7b7781..df049fb2 100644 --- a/src/components/Tours/ToursItem.tsx +++ b/src/components/Tours/ToursItem.tsx @@ -19,13 +19,13 @@ const ToursItem = ({ tour }: { tour: TourType }) => {
navigate(`detail/${id}`)}> -
+
여행지 이미지 -
+
{ />
-

+

{title}

-
+
- +
+ +
- {ratingAverage} - ({reviewCount}) + + {(Math.ceil(ratingAverage * 100) / 100).toFixed(1)} + + ({reviewCount.toLocaleString()})
- - {likedCount} +
+ +
+ + {likedCount.toLocaleString()} +
From 2f608cdf22f506fe054aa2e872af79717a021b34 Mon Sep 17 00:00:00 2001 From: sue Date: Thu, 4 Jan 2024 04:09:37 +0900 Subject: [PATCH 32/33] =?UTF-8?q?Feat:=20=EC=97=AC=ED=96=89=EC=A7=80=20?= =?UTF-8?q?=EB=AC=B4=ED=95=9C=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tours/ToursList.tsx | 47 +++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/src/components/Tours/ToursList.tsx b/src/components/Tours/ToursList.tsx index 543a9a16..10a2f6cc 100644 --- a/src/components/Tours/ToursList.tsx +++ b/src/components/Tours/ToursList.tsx @@ -1,24 +1,51 @@ import { TourType, ToursListProps } from '@/@types/tours.types'; import ToursItem from './ToursItem'; import { getTours } from '@api/tours'; -import { useQuery } from '@tanstack/react-query'; +import { useInfiniteQuery } from '@tanstack/react-query'; +import InfiniteScroll from 'react-infinite-scroller'; +import React from 'react'; const ToursList = ({ selectedRegion }: ToursListProps) => { - const toursQuery = useQuery({ + const { fetchNextPage, hasNextPage, data, error } = useInfiniteQuery({ queryKey: ['tours', selectedRegion], - queryFn: () => getTours(selectedRegion, 0, 30), + queryFn: ({ pageParam = 0 }) => getTours(selectedRegion, pageParam, 10), + initialPageParam: 0, + getNextPageParam: (lastPage) => { + const currentPage = lastPage?.data.data.pageable.pageNumber; + const totalPages = lastPage?.data.data.totalPages; + + if (currentPage < totalPages - 1) { + return currentPage + 1; + } + + return undefined; + }, }); - if (toursQuery.error) { - console.log('error - 예외 처리'); + if (error) { + return
데이터를 불러오는 중 오류가 발생했습니다.
; } return ( -
- {toursQuery.data?.data.data.content.map((tour: TourType) => { - return ; - })} -
+ fetchNextPage()} + hasMore={hasNextPage} + loader={ +
+ Loading ... +
+ }> +
+ {data?.pages.map((group, index) => ( + + {group?.data.data.content.map((tour: TourType) => ( + + ))} + + ))} +
+
); }; From 997a430efa82d76ef7618d6ac7141b36b51310d5 Mon Sep 17 00:00:00 2001 From: sue Date: Thu, 4 Jan 2024 04:11:04 +0900 Subject: [PATCH 33/33] =?UTF-8?q?Feat:=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20?= =?UTF-8?q?=EC=8B=9C=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=83=81=EB=8B=A8=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/mainRouter.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/router/mainRouter.tsx b/src/router/mainRouter.tsx index 714836f3..f3f150b8 100644 --- a/src/router/mainRouter.tsx +++ b/src/router/mainRouter.tsx @@ -1,11 +1,18 @@ -import { Outlet, Route, Routes } from 'react-router-dom'; +import { Outlet, Route, Routes, useLocation } from 'react-router-dom'; import { Header } from '@components/common/header'; import { Nav } from '@components/common/nav'; import Main from '@pages/main/main.page'; import Detail from '@pages/detail/detail.page'; import PostingReview from '@pages/postingReview/postingReview.page'; +import { useEffect } from 'react'; export function MainLayout() { + const location = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + }, [location]); + return (