From 36ced07813bc9d16c0cc5aaa28f77fb9bd08e462 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 17 Jun 2024 15:58:02 +0900 Subject: [PATCH 01/46] =?UTF-8?q?feat:=20NavBar=20=EB=86=92=EC=9D=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=EC=BA=98=EB=A6=B0=EB=8D=94=20UI=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 --- components/NavBar.tsx | 13 ++++++++----- components/calendar/InfoCalendar.tsx | 9 ++++----- pages/calendar.tsx | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/components/NavBar.tsx b/components/NavBar.tsx index ccc9d8e..ed7d0c8 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -18,11 +18,14 @@ const NavBar = () => { }, []); return ( -
-
+
+
{ return ( -
+
-
+
From 24486f0914e2b5a7412b8e4e1e4b61773ec980ef Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 17 Jun 2024 17:13:41 +0900 Subject: [PATCH 02/46] =?UTF-8?q?feat:=20=EC=B1=8C=EB=A6=B0=EC=A7=80=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=BA=98=EB=A6=B0=EB=8D=94=20UI?= =?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 --- components/calendar/InfoCalendar.tsx | 6 +- components/challenge/ChallengeCalendar.tsx | 135 +++++++++++++++++++-- pages/_app.tsx | 1 - pages/challenge/index.tsx | 4 +- styles/ChallengeCalendar.css | 100 --------------- 5 files changed, 132 insertions(+), 114 deletions(-) delete mode 100644 styles/ChallengeCalendar.css diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index f70f81e..b5b00ac 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -76,8 +76,8 @@ const StyledCalendarWrapper = styled.div` border: 0.5px rgba(244, 138, 130, 0.16) solid; } - .react-calendar__month-view__days__day--neighboringMonth, - .react-calendar__month-view__days__day--weekend { + .react-calendar__month-view__days__day--neighboringMonth + .react-calendar__month-view__days__day--weekend { color: #f06459; font-size: 1.25rem; } @@ -103,7 +103,6 @@ const StyledCalendarWrapper = styled.div` } .react-calendar__month-view__weekdays { - color: #f06459; font-size: 16px; font-weight: 500; text-decoration: none; @@ -123,6 +122,7 @@ const StyledCalendarWrapper = styled.div` border: 0.5px rgba(244, 138, 130, 0.16) solid; padding: 0.25rem 0.5rem; } + /*hover, focus, 선택됐을 시 */ .react-calendar__tile:enabled:hover, .react-calendar__tile:enabled:focus, diff --git a/components/challenge/ChallengeCalendar.tsx b/components/challenge/ChallengeCalendar.tsx index 4038951..d44465d 100644 --- a/components/challenge/ChallengeCalendar.tsx +++ b/components/challenge/ChallengeCalendar.tsx @@ -1,5 +1,6 @@ import Calendar from "react-calendar"; import { useState } from "react"; +import styled from "styled-components"; export default function ChallengeCalendar() { type DatePiece = Date | null; @@ -13,14 +14,132 @@ export default function ChallengeCalendar() { return (
- + + +
); } + +const StyledCalendarWrapper = styled.div` + .react-calendar { + display: flex; + flex-direction: column; + border: none; + width: 100%; + height: 90%; + margin: 0rem 0 3rem 0; + } + + /* 년도, 월 */ + .react-calendar__navigation { + display: flex; + height: fit-content; + font-size: 1.25rem; + font-weight: 400; + color: #f06459; + justify-content: flex-start; + width: 13.5rem; + margin-left: 1.25rem; + } + + .react-calendar__navigation button:enabled:hover, + .react-calendar__navigation button:enabled:focus { + background-color: white; + } + + .react-calendar__navigation__arrow { + width: 2rem; + height: 1.5rem; + } + + .react-calendar__navigation__label { + width: 2rem; + } + + /* 월 달력 (내비게이션 제외) */ + .react-calendar__month-view { + color: #f06459; + font-size: 1rem; + } + + .react-calendar__month-view__days__day--neighboringMonth { + color: #fac6c2; + } + + .react-calendar__month-view__days__day--weekend { + color: #f06459; + font-size: 1rem; + } + + /* weekend면서 neighboring일때는 #fac6c2 */ + .react-calendar__month-view__days__day--neighboringMonth.react-calendar__month-view__days__day--weekend { + color: #fac6c2 !important; + font-size: 1rem; + } + + /* 요일 */ + abbr[title] { + text-decoration: none; + text-align: center; + width: 100%; + display: none; + } + + .react-calendar__month-view__weekdays__weekday { + display: flex; + justify-content: center; + align-items: center; + display: none; + } + + .react-calendar__month-view__weekdays { + color: #f06459; + font-size: 1rem; + font-weight: 500; + text-decoration: none; + padding: 1rem 0rem; + display: none; + } + + /* 일 */ + .react-calendar__tile { + text-align: center; + width: 2.5rem; + height: 3.5rem; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 1.1rem; + } + + /*hover, focus, 선택됐을 시 */ + .react-calendar__tile:enabled:hover, + .react-calendar__tile:enabled:focus, + .react-calendar__tile--active { + background: #f06459; + color: white; + border-radius: 14px; + } + + /* 현재 날짜 */ + .react-calendar__tile--now { + background: #fff2f1; + color: #f06459; + } + + /*hover, focus 시 */ + .react-calendar__tile--now:enabled:hover, + .react-calendar__tile--now:enabled:focus { + background: #f06459; + border-radius: 14px; + } +`; diff --git a/pages/_app.tsx b/pages/_app.tsx index c073bfa..01299a8 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,7 +1,6 @@ import "@/styles/globals.css"; import "@/utils/toast.css"; import "public/fonts/font.css"; -import "@/styles/ChallengeCalendar.css"; // import "@/styles/Calendar.css"; import RootLayout from "@/components/Layout"; import { diff --git a/pages/challenge/index.tsx b/pages/challenge/index.tsx index f114b85..3bc4f0f 100644 --- a/pages/challenge/index.tsx +++ b/pages/challenge/index.tsx @@ -8,7 +8,7 @@ const Challenge: NextPage = () => { return (
-
+
아크릴 유화 기초 @@ -23,7 +23,7 @@ const Challenge: NextPage = () => {
-
+
챌린지 달성률
diff --git a/styles/ChallengeCalendar.css b/styles/ChallengeCalendar.css deleted file mode 100644 index 28c893f..0000000 --- a/styles/ChallengeCalendar.css +++ /dev/null @@ -1,100 +0,0 @@ -.react-calendar { - display: flex; - flex-direction: column; - border: none; - width: 100%; - height: 100%; - margin: 3rem 0; -} - -/* 년도, 월 */ -.react-calendar__navigation { - display: flex; - height: fit-content; - font-size: 1.25rem; - font-weight: 400; - color: #f06459; - padding: 0 4rem; - justify-content: flex-start; -} - -.react-calendar__navigation button:enabled:hover, -.react-calendar__navigation button:enabled:focus { - background-color: white; -} - -.react-calendar__navigation__arrow { - width: 2rem; - height: 1.5rem; -} - -.react-calendar__navigation__label { - width: 4rem; -} - -/* 월 달력 (내비게이션 제외) */ -.react-calendar__month-view { - padding: 1rem; - color: #f06459; - font-size: 1.25rem; -} - -.react-calendar__month-view__days__day--neighboringMonth, -.react-calendar__month-view__days__day--weekend { - color: #f06459; - font-size: 1.25rem; -} - -/* 요일 */ -abbr[title] { - text-decoration: none; - text-align: center; - width: 100%; -} - -.react-calendar__month-view__weekdays__weekday { - display: flex; - justify-content: center; - align-items: center; -} - -.react-calendar__month-view__weekdays { - color: #f06459; - font-size: 16px; - font-weight: 500; - text-decoration: none; - padding: 1rem 0rem; -} - -/* 일 */ -.react-calendar__tile { - text-align: center; - width: 2.5rem; - height: 3.5rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - font-size: 1.25rem; -} -/*hover, focus, 선택됐을 시 */ -.react-calendar__tile:enabled:hover, -.react-calendar__tile:enabled:focus, -.react-calendar__tile--active { - background: #f06459; - color: white; - border-radius: 14px; -} - -/* 현재 날짜 */ -.react-calendar__tile--now { - background: #fff2f1; - color: #f06459; -} - -/*hover, focus 시 */ -.react-calendar__tile--now:enabled:hover, -.react-calendar__tile--now:enabled:focus { - background: #f06459; - border-radius: 14px; -} From bc9d77d8925381ff2f95dedf4fc4bed4e8a01712 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 17 Jun 2024 17:28:18 +0900 Subject: [PATCH 03/46] =?UTF-8?q?feat:=20=EC=B1=8C=EB=A6=B0=EC=A7=80=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=BA=98=EB=A6=B0=EB=8D=94=20?= =?UTF-8?q?=ED=8F=B0=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/InfoCalendar.tsx | 2 +- components/challenge/ChallengeCalendar.tsx | 13 ++- pages/challenge/index.tsx | 10 +-- styles/ChallengeCalendar.css | 98 ++++++++++++++++++++++ 4 files changed, 115 insertions(+), 8 deletions(-) create mode 100644 styles/ChallengeCalendar.css diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index b5b00ac..9645a84 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -18,7 +18,7 @@ export default function InfoCalendar() { {
- + 아크릴 유화 기초 -
+
8명 참여중
@@ -23,12 +23,12 @@ const Challenge: NextPage = () => {
-
+
챌린지 달성률

- + 전체 달성률
@@ -38,7 +38,7 @@ const Challenge: NextPage = () => {

- + 개인 달성률
diff --git a/styles/ChallengeCalendar.css b/styles/ChallengeCalendar.css new file mode 100644 index 0000000..d0e2f9f --- /dev/null +++ b/styles/ChallengeCalendar.css @@ -0,0 +1,98 @@ +.react-calendar { + display: flex; + flex-direction: column; + border: none; + width: 100%; + height: 100%; + margin: 3rem 0; +} + +/* 년도, 월 */ +.react-calendar__navigation { + display: flex; + height: fit-content; + font-size: 1.25rem; + font-weight: 400; + color: #f06459; + padding: 0 4rem; + justify-content: flex-start; +} + +.react-calendar__navigation button:enabled:hover, +.react-calendar__navigation button:enabled:focus { + background-color: white; +} + +.react-calendar__navigation__arrow { + width: 2rem; + height: 1.5rem; +} + +.react-calendar__navigation__label { + width: 4rem; +} + +/* 월 달력 (내비게이션 제외) */ +.react-calendar__month-view { + padding: 1rem; + color: #f06459; + font-size: 1.25rem; +} + +.react-calendar__month-view__days__day--neighboringMonth, +.react-calendar__month-view__days__day--weekend { + color: #f06459; + font-size: 1.25rem; +} + +/* 요일 */ +abbr[title] { + text-decoration: none; + text-align: center; + width: 100%; +} + +.react-calendar__month-view__weekdays__weekday { + display: flex; + justify-content: center; + align-items: center; +} + +.react-calendar__month-view__weekdays { + color: #f06459; + font-size: 16px; + font-weight: 500; + text-decoration: none; + padding: 1rem 0rem; +} + +/* 일 */ +.react-calendar__tile { + text-align: center; + width: 2.5rem; + height: 3.5rem; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 1.25rem; +} +/*hover, focus, 선택됐을 시 */ +.react-calendar__tile:enabled:hover, +.react-calendar__tile:enabled:focus, +.react-calendar__tile--active { + background: #f06459; + color: white; +} + +/* 현재 날짜 */ +.react-calendar__tile--now { + background: #fff2f1; + color: #f06459; +} + +/*hover, focus 시 */ +.react-calendar__tile--now:enabled:hover, +.react-calendar__tile--now:enabled:focus { + background: #f06459; +} From ac1cfe71c52cac2f957aab08776fbf4e1c98c958 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Tue, 18 Jun 2024 11:03:35 +0900 Subject: [PATCH 04/46] =?UTF-8?q?feat:=20=EC=B1=8C=EB=A6=B0=EC=A7=80=20?= =?UTF-8?q?=EC=BA=98=EB=A6=B0=EB=8D=94=20=EC=B1=8C=EB=A6=B0=EC=A7=80?= =?UTF-8?q?=EB=A7=88=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/InfoCalendar.tsx | 2 ++ components/challenge/ChallengeCalendar.tsx | 42 ++++++++++++++++++++++ package.json | 1 + public/svgs/LogoMark.svg | 12 +++---- yarn.lock | 8 +++++ 5 files changed, 59 insertions(+), 6 deletions(-) diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index 9645a84..259b838 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -1,6 +1,7 @@ import Calendar from "react-calendar"; import { useState } from "react"; import styled from "styled-components"; +import moment from "moment"; export default function InfoCalendar() { type DatePiece = Date | null; @@ -22,6 +23,7 @@ export default function InfoCalendar() { next2Label={null} prev2Label={null} minDate={new Date(2024, 4, 1)} + formatDay={(locale, date) => moment(date).format("DD")} />

diff --git a/components/challenge/ChallengeCalendar.tsx b/components/challenge/ChallengeCalendar.tsx index 432d06e..884fca9 100644 --- a/components/challenge/ChallengeCalendar.tsx +++ b/components/challenge/ChallengeCalendar.tsx @@ -1,6 +1,7 @@ import Calendar from "react-calendar"; import { useState } from "react"; import styled from "styled-components"; +import LogoMark from "@/public/svgs/LogoMark.svg"; export default function ChallengeCalendar() { type DatePiece = Date | null; @@ -12,6 +13,22 @@ export default function ChallengeCalendar() { setClickedDate(clickedDate); }; + const customTileContent = ({ date, view }) => { + // if (view === 'month' && DatesList.some(d => d.getTime() === date.getTime())) { + + const customDate = new Date(2024, 5, 19); + if (view === "month" && date.getTime() === customDate.getTime()) { + return ( +
+
+ +
+
+ ); + } + return null; + }; + return (
@@ -22,6 +39,7 @@ export default function ChallengeCalendar() { next2Label={null} prev2Label={null} minDate={new Date(2024, 4, 1)} + tileContent={customTileContent} />
@@ -38,6 +56,26 @@ const StyledCalendarWrapper = styled.div` margin: 0rem 0 3rem 0; } + .custom-tile-content { + position: absolute; + display: flex; + justify-content: center; + align-items: center; + z-index: 1; + width: 2.6rem; + height: 2.6rem; + } + + .custom-image { + position: absolute; + transform: translate(-50%, -50%); + max-width: 100%; + max-height: 100%; + left: 50%; + top: 50%; + z-index: 1; + } + /* 년도, 월 */ .react-calendar__navigation { display: flex; @@ -70,6 +108,10 @@ const StyledCalendarWrapper = styled.div` color: #f06459; font-size: 1rem; font-family: "Pretendard"; + display: flex; + position: relative; + align-items: center; + justify-content: center; } .react-calendar__month-view__days__day--neighboringMonth { diff --git a/package.json b/package.json index 2cfb781..f7a9c6f 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "embla-carousel-autoplay": "^8.1.3", "embla-carousel-react": "^8.1.3", "lottie-web": "^5.12.2", + "moment": "^2.30.1", "next": "12.3.4", "postcss": "^8.4.38", "react": "^18.2.0", diff --git a/public/svgs/LogoMark.svg b/public/svgs/LogoMark.svg index 5bdab83..8bc40ae 100644 --- a/public/svgs/LogoMark.svg +++ b/public/svgs/LogoMark.svg @@ -1,10 +1,10 @@ - - - + + + - - + + - + diff --git a/yarn.lock b/yarn.lock index 3f5d49d..3399d4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5031,6 +5031,13 @@ __metadata: languageName: node linkType: hard +"moment@npm:^2.30.1": + version: 2.30.1 + resolution: "moment@npm:2.30.1" + checksum: 10c0/865e4279418c6de666fca7786607705fd0189d8a7b7624e2e56be99290ac846f90878a6f602e34b4e0455c549b85385b1baf9966845962b313699e7cb847543a + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -6714,6 +6721,7 @@ __metadata: eslint: "npm:8.54.0" eslint-config-next: "npm:14.0.3" lottie-web: "npm:^5.12.2" + moment: "npm:^2.30.1" next: "npm:12.3.4" postcss: "npm:^8.4.38" react: "npm:^18.2.0" From 3183598c7445276e565fba3643f69693b040facb Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Tue, 18 Jun 2024 11:37:18 +0900 Subject: [PATCH 05/46] =?UTF-8?q?feat:=20=EC=98=A8=EB=B3=B4=EB=94=A9=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8/=EB=A1=9C=EA=B7=B8=EC=9D=B8/=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=EA=B0=80=EC=9E=85=20=EA=B8=B0=EB=B3=B8=20UI=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/main/index.tsx | 28 ++++++++++++++++++++++++++++ pages/main/login.tsx | 15 +++++++++++++++ pages/main/signup.tsx | 15 +++++++++++++++ public/svgs/SplashIcon.svg | 9 +++++++++ 4 files changed, 67 insertions(+) create mode 100644 pages/main/index.tsx create mode 100644 pages/main/login.tsx create mode 100644 pages/main/signup.tsx create mode 100644 public/svgs/SplashIcon.svg diff --git a/pages/main/index.tsx b/pages/main/index.tsx new file mode 100644 index 0000000..04101eb --- /dev/null +++ b/pages/main/index.tsx @@ -0,0 +1,28 @@ +import Button from "@/components/Button"; +import SplashIcon from "@/public/svgs/SplashIcon.svg"; +import { NextPage } from "next"; +import { useRouter } from "next/router"; + +const OnBoardingMain: NextPage = () => { + const router = useRouter(); + + return ( +
+ +
+
+
+ ); +}; + +export default OnBoardingMain; diff --git a/pages/main/login.tsx b/pages/main/login.tsx new file mode 100644 index 0000000..a6fc43b --- /dev/null +++ b/pages/main/login.tsx @@ -0,0 +1,15 @@ +import HeadFunction from "@/components/HeadFunction"; +import { NextPage } from "next"; +import { useRouter } from "next/router"; + +const Login: NextPage = () => { + const router = useRouter(); + + return ( +
+ +
+ ); +}; + +export default Login; diff --git a/pages/main/signup.tsx b/pages/main/signup.tsx new file mode 100644 index 0000000..d483f72 --- /dev/null +++ b/pages/main/signup.tsx @@ -0,0 +1,15 @@ +import HeadFunction from "@/components/HeadFunction"; +import { NextPage } from "next"; +import { useRouter } from "next/router"; + +const SignUp: NextPage = () => { + const router = useRouter(); + + return ( +
+ +
+ ); +}; + +export default SignUp; diff --git a/public/svgs/SplashIcon.svg b/public/svgs/SplashIcon.svg new file mode 100644 index 0000000..35e2ccb --- /dev/null +++ b/public/svgs/SplashIcon.svg @@ -0,0 +1,9 @@ + + + + + + + + + From fa2f7eb0a6345d523f66c5d7596ab0a03fe5d224 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Tue, 18 Jun 2024 13:20:06 +0900 Subject: [PATCH 06/46] =?UTF-8?q?feat:=20=EC=98=A8=EB=B3=B4=EB=94=A9=20?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EC=88=98=EC=A0=95,=20=EB=8B=AC=EC=84=B1?= =?UTF-8?q?=EB=A5=A0Box=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/challenge/AwardBox.tsx | 21 +++++++++++++++++++++ pages/challenge/index.tsx | 22 +++------------------- pages/{main => }/login.tsx | 0 pages/{main/index.tsx => main.tsx} | 8 ++++---- pages/{main => }/signup.tsx | 0 5 files changed, 28 insertions(+), 23 deletions(-) create mode 100644 components/challenge/AwardBox.tsx rename pages/{main => }/login.tsx (100%) rename pages/{main/index.tsx => main.tsx} (72%) rename pages/{main => }/signup.tsx (100%) diff --git a/components/challenge/AwardBox.tsx b/components/challenge/AwardBox.tsx new file mode 100644 index 0000000..10f29f0 --- /dev/null +++ b/components/challenge/AwardBox.tsx @@ -0,0 +1,21 @@ +interface AwardProps { + style?: string; + text: string; + percent: string; +} + +export default function AwardBox({ style, text, percent }: AwardProps) { + return ( +

+ + {text} +
+
+ + {percent} + +

+ ); +} diff --git a/pages/challenge/index.tsx b/pages/challenge/index.tsx index a41b73e..374aefe 100644 --- a/pages/challenge/index.tsx +++ b/pages/challenge/index.tsx @@ -1,3 +1,4 @@ +import AwardBox from "@/components/challenge/AwardBox"; import ChallengeCalendar from "@/components/challenge/ChallengeCalendar"; import HeadFunction from "@/components/HeadFunction"; import NavBar from "@/components/NavBar"; @@ -27,25 +28,8 @@ const Challenge: NextPage = () => { 챌린지 달성률
-

- - 전체 달성률 -
-
- - 50% - -

- -

- - 개인 달성률 -
-
- - 50% - -

+ +
diff --git a/pages/main/login.tsx b/pages/login.tsx similarity index 100% rename from pages/main/login.tsx rename to pages/login.tsx diff --git a/pages/main/index.tsx b/pages/main.tsx similarity index 72% rename from pages/main/index.tsx rename to pages/main.tsx index 04101eb..5106ffe 100644 --- a/pages/main/index.tsx +++ b/pages/main.tsx @@ -12,13 +12,13 @@ const OnBoardingMain: NextPage = () => {
diff --git a/pages/main/signup.tsx b/pages/signup.tsx similarity index 100% rename from pages/main/signup.tsx rename to pages/signup.tsx From 1ba426697a447e13dbb7b015e8fd99d4664dd46f Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Mon, 24 Jun 2024 00:41:47 +0900 Subject: [PATCH 07/46] =?UTF-8?q?feat:=20=ED=86=A0=ED=81=B0=20set,=20get?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/client.ts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/apis/client.ts b/apis/client.ts index 047b2d8..b02a3af 100644 --- a/apis/client.ts +++ b/apis/client.ts @@ -1,8 +1,47 @@ import axios from "axios"; +interface ResponseBody { + isSuccess: boolean; + code: number; + message: string; +} + +const setTokenFromLocalStorage = (access_token: string) => { + localStorage.setItem("access_token", access_token); +}; + +const getTokenFromLocalStorage = () => { + const accessToken = localStorage.getItem("access_token"); + if (!accessToken) { + return null; + } + return accessToken; +}; + const client = axios.create({ baseURL: process.env.NEXT_PUBLIC_API_URL, withCredentials: true, + headers: { + "Access-Control-Allow-Origin": "http://localhost:3000", + "Access-Control-Allow-Credentials": "true", + }, + validateStatus: (status) => { + return status < 300; + }, }); +client.interceptors.request.use( + async (config) => { + if (typeof document !== "undefined") { + const token = getTokenFromLocalStorage(); + config.headers.set("Authorization", `Bearer ${token}`); + } + return config; + }, + (error) => { + return Promise.reject(error); + }, +); + export default client; +export type { ResponseBody }; From 877df99a11495b9fdd20aa579307010ec2744837 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 24 Jun 2024 13:49:35 +0900 Subject: [PATCH 08/46] =?UTF-8?q?feat:=20Login=20UI=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 + pages/login.tsx | 66 +++++ pages/signup.tsx | 73 ++++- public/svgs/LogoLetter.svg | 9 + yarn.lock | 545 ++++++++++++++++++++++++++++++++++++- 5 files changed, 685 insertions(+), 9 deletions(-) create mode 100644 public/svgs/LogoLetter.svg diff --git a/package.json b/package.json index f7a9c6f..0bc725b 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@types/node": "20.14.2", "@types/react": "18.3.3", + "@yarnpkg/pnpify": "^4.1.0", "eslint": "8.54.0", "eslint-config-next": "14.0.3", "typescript": "5.4.5" diff --git a/pages/login.tsx b/pages/login.tsx index a6fc43b..e43116b 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -1,13 +1,79 @@ import HeadFunction from "@/components/HeadFunction"; +import { useState, useEffect, useCallback, useRef } from "react"; import { NextPage } from "next"; import { useRouter } from "next/router"; +import Button from "@/components/Button"; +import LogoLetterIcon from "@/public/svgs/LogoLetter.svg"; const Login: NextPage = () => { const router = useRouter(); + const [idValue, setIDValue] = useState(""); + const [pwValue, setPWValue] = useState(""); + const idInputRef = useRef(null); + const pwInputRef = useRef(null); + + //input 함수 + //onChange + const onChangeID = (e: React.ChangeEvent) => { + setIDValue(e.target.value); + }; + + const onChangePW = (e: React.ChangeEvent) => { + setPWValue(e.target.value); + }; + + //onSubmit + const onSubmit = useCallback( + (e: React.FormEvent) => { + e.preventDefault(); + + //입력한 값이 없을 때 alert 추가 + if (idValue.trim() == "") { + alert("아이디를 입력해주세요."); + } else if (pwValue.trim() == "") { + // createChatting(inputValue); + alert("비밀번호를 입력해주세요."); + } else { + //api + } + }, + [idValue, pwValue], + ); + return (
+
+ +
+ + + +
+ +
); }; diff --git a/pages/signup.tsx b/pages/signup.tsx index d483f72..96f40cd 100644 --- a/pages/signup.tsx +++ b/pages/signup.tsx @@ -1,13 +1,84 @@ +import Button from "@/components/Button"; import HeadFunction from "@/components/HeadFunction"; import { NextPage } from "next"; import { useRouter } from "next/router"; +import { useState, useEffect, useCallback, useRef } from "react"; const SignUp: NextPage = () => { const router = useRouter(); + const [idValue, setIDValue] = useState(""); + const [pwValue, setPWValue] = useState(""); + const inputRef = useRef(null); + + //input 함수 + //onChange + const onChangeID = (e: React.ChangeEvent) => { + setIDValue(e.target.value); + }; + + const onChangePW = (e: React.ChangeEvent) => { + setPWValue(e.target.value); + }; + + //inputRef설정 함수 + const handleInputClick = (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + inputRef.current?.focus(); + }; + //onSubmit + const onSubmit = useCallback( + (e: React.FormEvent) => { + e.preventDefault(); + + //입력한 값이 없을 때 alert 추가 + if (idValue.trim() == "") { + alert("아이디를 입력해주세요."); + } else if (pwValue.trim() == "") { + // createChatting(inputValue); + alert("비밀번호를 입력해주세요."); + } else { + //api + } + }, + [idValue, pwValue], + ); + return (
- + +
+
+ + + +
+ +
); }; diff --git a/public/svgs/LogoLetter.svg b/public/svgs/LogoLetter.svg new file mode 100644 index 0000000..7ff1a38 --- /dev/null +++ b/public/svgs/LogoLetter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/yarn.lock b/yarn.lock index 3399d4b..99abfe2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,15 @@ __metadata: languageName: node linkType: hard +"@arcanis/slice-ansi@npm:^1.1.1": + version: 1.1.1 + resolution: "@arcanis/slice-ansi@npm:1.1.1" + dependencies: + grapheme-splitter: "npm:^1.0.4" + checksum: 10c0/2f222b121b8aaf67e8495e27d60ebfc34e2472033445c3380e93fb06aba9bfef6ab3096aca190a181b3dd505ed4c07f4dc7243fc9cb5369008b649cd1e39e8d8 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.24.7": version: 7.24.7 resolution: "@babel/code-frame@npm:7.24.7" @@ -1789,6 +1798,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^4.0.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 10c0/33b6fb1d0834ec8dd7689ddc0e2781c2bfd8b9c4e4bacbcb14111e0ae00621f2c264b8a7d36541799d74888b5dccdf422a891a5cb5a709ace26325eedc81e22e + languageName: node + linkType: hard + "@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0": version: 8.0.0 resolution: "@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0" @@ -1954,6 +1970,15 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: "npm:^2.0.0" + checksum: 10c0/73946918c025339db68b09abd91fa3001e87fc749c619d2e9c2003a663039d4c3cb89836c98a96598b3d47dec2481284ba85355392644911f5ecd2336536697f + languageName: node + linkType: hard + "@tanstack/eslint-plugin-query@npm:^5.35.6": version: 5.43.1 resolution: "@tanstack/eslint-plugin-query@npm:5.43.1" @@ -1990,6 +2015,25 @@ __metadata: languageName: node linkType: hard +"@types/cacheable-request@npm:^6.0.1": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "npm:*" + "@types/keyv": "npm:^3.1.4" + "@types/node": "npm:*" + "@types/responselike": "npm:^1.0.0" + checksum: 10c0/10816a88e4e5b144d43c1d15a81003f86d649776c7f410c9b5e6579d0ad9d4ca71c541962fb403077388b446e41af7ae38d313e46692144985f006ac5e11fa03 + languageName: node + linkType: hard + +"@types/emscripten@npm:^1.39.6": + version: 1.39.13 + resolution: "@types/emscripten@npm:1.39.13" + checksum: 10c0/99c314418b6fbe113c4c81dc89501bdf723020d1de262a36a4e45236b268dcec3deab104e3a7d3569e6d7c5c942de30c9c6d77b93170c1bcaa85620c7ee4c2ba + languageName: node + linkType: hard + "@types/hoist-non-react-statics@npm:*": version: 3.3.5 resolution: "@types/hoist-non-react-statics@npm:3.3.5" @@ -2000,6 +2044,13 @@ __metadata: languageName: node linkType: hard +"@types/http-cache-semantics@npm:*": + version: 4.0.4 + resolution: "@types/http-cache-semantics@npm:4.0.4" + checksum: 10c0/51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6 + languageName: node + linkType: hard + "@types/json5@npm:^0.0.29": version: 0.0.29 resolution: "@types/json5@npm:0.0.29" @@ -2007,6 +2058,24 @@ __metadata: languageName: node linkType: hard +"@types/keyv@npm:^3.1.4": + version: 3.1.4 + resolution: "@types/keyv@npm:3.1.4" + dependencies: + "@types/node": "npm:*" + checksum: 10c0/ff8f54fc49621210291f815fe5b15d809fd7d032941b3180743440bd507ecdf08b9e844625fa346af568c84bf34114eb378dcdc3e921a08ba1e2a08d7e3c809c + languageName: node + linkType: hard + +"@types/node@npm:*": + version: 20.14.8 + resolution: "@types/node@npm:20.14.8" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10c0/06d4643fa3b179b41fe19f9c75c240278ca1f7a313b3b837bc36ea119499c7ad77f06bbe72694ac04aa91ec77fe747baa09b889f4c435450c1724a26bd55f160 + languageName: node + linkType: hard + "@types/node@npm:20.14.2": version: 20.14.2 resolution: "@types/node@npm:20.14.2" @@ -2016,6 +2085,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.17.15": + version: 18.19.39 + resolution: "@types/node@npm:18.19.39" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10c0/a9eb33bc093beba6bd5d4e839de7d1d1f496cd7e741c2f6c7161318dba0f37227bb25d8306907194992488d6c59a7363a419d72298549483d33402227a2d435b + languageName: node + linkType: hard + "@types/prop-types@npm:*": version: 15.7.12 resolution: "@types/prop-types@npm:15.7.12" @@ -2033,6 +2111,22 @@ __metadata: languageName: node linkType: hard +"@types/responselike@npm:^1.0.0": + version: 1.0.3 + resolution: "@types/responselike@npm:1.0.3" + dependencies: + "@types/node": "npm:*" + checksum: 10c0/a58ba341cb9e7d74f71810a88862da7b2a6fa42e2a1fc0ce40498f6ea1d44382f0640117057da779f74c47039f7166bf48fad02dc876f94e005c7afa50f5e129 + languageName: node + linkType: hard + +"@types/semver@npm:^7.1.0": + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa + languageName: node + linkType: hard + "@types/styled-components@npm:^5.1.34": version: 5.1.34 resolution: "@types/styled-components@npm:5.1.34" @@ -2051,6 +2145,13 @@ __metadata: languageName: node linkType: hard +"@types/treeify@npm:^1.0.0": + version: 1.0.3 + resolution: "@types/treeify@npm:1.0.3" + checksum: 10c0/758902638ff83a790c13359729d77aeb80aae50f7039670037e3a0ba2bcc7b09dd49173ab21a96946d83af1682fcd70e448e49151ecd46e190f8925077142d4a + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.4.2 || ^6.0.0": version: 6.21.0 resolution: "@typescript-eslint/parser@npm:6.21.0" @@ -2189,6 +2290,126 @@ __metadata: languageName: node linkType: hard +"@yarnpkg/core@npm:^4.0.3, @yarnpkg/core@npm:^4.0.5": + version: 4.1.1 + resolution: "@yarnpkg/core@npm:4.1.1" + dependencies: + "@arcanis/slice-ansi": "npm:^1.1.1" + "@types/semver": "npm:^7.1.0" + "@types/treeify": "npm:^1.0.0" + "@yarnpkg/fslib": "npm:^3.1.0" + "@yarnpkg/libzip": "npm:^3.1.0" + "@yarnpkg/parsers": "npm:^3.0.2" + "@yarnpkg/shell": "npm:^4.0.2" + camelcase: "npm:^5.3.1" + chalk: "npm:^3.0.0" + ci-info: "npm:^3.2.0" + clipanion: "npm:^4.0.0-rc.2" + cross-spawn: "npm:7.0.3" + diff: "npm:^5.1.0" + dotenv: "npm:^16.3.1" + fast-glob: "npm:^3.2.2" + got: "npm:^11.7.0" + lodash: "npm:^4.17.15" + micromatch: "npm:^4.0.2" + p-limit: "npm:^2.2.0" + semver: "npm:^7.1.2" + strip-ansi: "npm:^6.0.0" + tar: "npm:^6.0.5" + tinylogic: "npm:^2.0.0" + treeify: "npm:^1.1.0" + tslib: "npm:^2.4.0" + tunnel: "npm:^0.0.6" + checksum: 10c0/7db63b4144b397a18ea92a468aed3338b3feabd8b812541a37de9d6ff380b65fdfcff926aa5a697430280ba31937c794fadd662f5523437e6098230516a27fdd + languageName: node + linkType: hard + +"@yarnpkg/fslib@npm:^3.0.2, @yarnpkg/fslib@npm:^3.1.0": + version: 3.1.0 + resolution: "@yarnpkg/fslib@npm:3.1.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/e327aaf73fe2fff442a71f045fe006f13931a09021b5b868a993a644d4950cd3c5589f1d58ee9e38390bca83705a30b649db7ae462fe704fdb6cdeb12ed2232a + languageName: node + linkType: hard + +"@yarnpkg/libzip@npm:^3.1.0": + version: 3.1.0 + resolution: "@yarnpkg/libzip@npm:3.1.0" + dependencies: + "@types/emscripten": "npm:^1.39.6" + "@yarnpkg/fslib": "npm:^3.1.0" + tslib: "npm:^2.4.0" + peerDependencies: + "@yarnpkg/fslib": ^3.1.0 + checksum: 10c0/11e12724d916584e748dc3cb364840f3763799492108b39b008301b817e43689d34a68d7ecb1cab9610cc058aa5967e5088658774ae0fbe77a18b8cdb5ad382a + languageName: node + linkType: hard + +"@yarnpkg/nm@npm:^4.0.2": + version: 4.0.2 + resolution: "@yarnpkg/nm@npm:4.0.2" + dependencies: + "@yarnpkg/core": "npm:^4.0.3" + "@yarnpkg/fslib": "npm:^3.0.2" + "@yarnpkg/pnp": "npm:^4.0.2" + checksum: 10c0/84f193997f9fe40b75fac8adae71f82ceece1ade4cbbe3f5918c428c8e1c41ba09b9357b179679145c941f36611955bc54c83c0c37db31cd587e6d567043c76c + languageName: node + linkType: hard + +"@yarnpkg/parsers@npm:^3.0.2": + version: 3.0.2 + resolution: "@yarnpkg/parsers@npm:3.0.2" + dependencies: + js-yaml: "npm:^3.10.0" + tslib: "npm:^2.4.0" + checksum: 10c0/a0c340e13129643162423d7e666061c0b39b143bfad3fc5a74c7d92a30fd740f6665d41cd4e61832c20375889d793eea1d1d103cacb39ed68f7acd168add8c53 + languageName: node + linkType: hard + +"@yarnpkg/pnp@npm:^4.0.2": + version: 4.0.6 + resolution: "@yarnpkg/pnp@npm:4.0.6" + dependencies: + "@types/node": "npm:^18.17.15" + "@yarnpkg/fslib": "npm:^3.1.0" + checksum: 10c0/14aaa1a67383947b81b8e8fdc769e612fb0171d3fcf59aefe368b743607e97ef091a594a1702998e385955e061b3fb502d4c0680b167676ff989001ff07f233c + languageName: node + linkType: hard + +"@yarnpkg/pnpify@npm:^4.1.0": + version: 4.1.0 + resolution: "@yarnpkg/pnpify@npm:4.1.0" + dependencies: + "@yarnpkg/core": "npm:^4.0.5" + "@yarnpkg/fslib": "npm:^3.1.0" + "@yarnpkg/nm": "npm:^4.0.2" + clipanion: "npm:^4.0.0-rc.2" + tslib: "npm:^2.4.0" + bin: + pnpify: ./lib/cli.js + checksum: 10c0/d38970bc9b8c0b343a3d83ae575855c94b54df8d92d192d628a577cf68d71396c5db831ea2c48a36721f532fd127bd211a979e8cb47d1bb48739b3abefef825e + languageName: node + linkType: hard + +"@yarnpkg/shell@npm:^4.0.2": + version: 4.0.2 + resolution: "@yarnpkg/shell@npm:4.0.2" + dependencies: + "@yarnpkg/fslib": "npm:^3.0.2" + "@yarnpkg/parsers": "npm:^3.0.2" + chalk: "npm:^3.0.0" + clipanion: "npm:^4.0.0-rc.2" + cross-spawn: "npm:7.0.3" + fast-glob: "npm:^3.2.2" + micromatch: "npm:^4.0.2" + tslib: "npm:^2.4.0" + bin: + shell: ./lib/cli.js + checksum: 10c0/b78b6a00a68173052429bf19c625490d9d48c1f876acb25c56da2b75ad50acfe8f7fe14466be40b061698015d6aacdef5b217c6dece0dc2cc01e3bb4b4cefa23 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -2308,6 +2529,15 @@ __metadata: languageName: node linkType: hard +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de + languageName: node + linkType: hard + "argparse@npm:^2.0.1": version: 2.0.1 resolution: "argparse@npm:2.0.1" @@ -2658,6 +2888,28 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 10c0/a6547fb4954b318aa831cbdd2f7b376824bc784fb1fa67610e4147099e3074726072d9af89f12efb69121415a0e1f2918a8ddd4aafcbcf4e91fbeef4a59cd42c + languageName: node + linkType: hard + +"cacheable-request@npm:^7.0.2": + version: 7.0.4 + resolution: "cacheable-request@npm:7.0.4" + dependencies: + clone-response: "npm:^1.0.2" + get-stream: "npm:^5.1.0" + http-cache-semantics: "npm:^4.0.0" + keyv: "npm:^4.0.0" + lowercase-keys: "npm:^2.0.0" + normalize-url: "npm:^6.0.1" + responselike: "npm:^2.0.0" + checksum: 10c0/0834a7d17ae71a177bc34eab06de112a43f9b5ad05ebe929bec983d890a7d9f2bc5f1aa8bb67ea2b65e07a3bc74bea35fa62dd36dbac52876afe36fdcf83da41 + languageName: node + linkType: hard + "call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": version: 1.0.7 resolution: "call-bind@npm:1.0.7" @@ -2685,6 +2937,13 @@ __metadata: languageName: node linkType: hard +"camelcase@npm:^5.3.1": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: 10c0/92ff9b443bfe8abb15f2b1513ca182d16126359ad4f955ebc83dc4ddcc4ef3fdd2c078bc223f2673dc223488e75c99b16cc4d056624374b799e6a1555cf61b23 + languageName: node + linkType: hard + "camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" @@ -2717,6 +2976,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: "npm:^4.1.0" + supports-color: "npm:^7.1.0" + checksum: 10c0/ee650b0a065b3d7a6fda258e75d3a86fc8e4effa55871da730a9e42ccb035bf5fd203525e5a1ef45ec2582ecc4f65b47eb11357c526b84dd29a14fb162c414d2 + languageName: node + linkType: hard + "chalk@npm:^4.0.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -2753,6 +3022,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^3.2.0": + version: 3.9.0 + resolution: "ci-info@npm:3.9.0" + checksum: 10c0/6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -2760,6 +3036,26 @@ __metadata: languageName: node linkType: hard +"clipanion@npm:^4.0.0-rc.2": + version: 4.0.0-rc.3 + resolution: "clipanion@npm:4.0.0-rc.3" + dependencies: + typanion: "npm:^3.8.0" + peerDependencies: + typanion: "*" + checksum: 10c0/5171fd04539b39b5483bd097d5f828da165fa47b4718378cb0bc3c2f70dfa11736f01727cfa4b9566fc8eabad03473e62ae98470c4c8d15c618ee1294e07169f + languageName: node + linkType: hard + +"clone-response@npm:^1.0.2": + version: 1.0.3 + resolution: "clone-response@npm:1.0.3" + dependencies: + mimic-response: "npm:^1.0.0" + checksum: 10c0/06a2b611824efb128810708baee3bd169ec9a1bf5976a5258cd7eb3f7db25f00166c6eee5961f075c7e38e194f373d4fdf86b8166ad5b9c7e82bbd2e333a6087 + languageName: node + linkType: hard + "clsx@npm:^2.0.0, clsx@npm:^2.1.0": version: 2.1.1 resolution: "clsx@npm:2.1.1" @@ -2862,7 +3158,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2": +"cross-spawn@npm:7.0.3, cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -3017,6 +3313,15 @@ __metadata: languageName: node linkType: hard +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: "npm:^3.1.0" + checksum: 10c0/bd89d23141b96d80577e70c54fb226b2f40e74a6817652b80a116d7befb8758261ad073a8895648a29cc0a5947021ab66705cb542fa9c143c82022b27c5b175e + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -3031,6 +3336,13 @@ __metadata: languageName: node linkType: hard +"defer-to-connect@npm:^2.0.0": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 10c0/625ce28e1b5ad10cf77057b9a6a727bf84780c17660f6644dab61dd34c23de3001f03cedc401f7d30a4ed9965c2e8a7336e220a329146f2cf85d4eddea429782 + languageName: node + linkType: hard + "define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": version: 1.1.4 resolution: "define-data-property@npm:1.1.4" @@ -3081,6 +3393,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^5.1.0": + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 10c0/aed0941f206fe261ecb258dc8d0ceea8abbde3ace5827518ff8d302f0fc9cc81ce116c4d8f379151171336caf0516b79e01abdc1ed1201b6440d895a66689eb4 + languageName: node + linkType: hard + "dir-glob@npm:^3.0.1": version: 3.0.1 resolution: "dir-glob@npm:3.0.1" @@ -3163,6 +3482,13 @@ __metadata: languageName: node linkType: hard +"dotenv@npm:^16.3.1": + version: 16.4.5 + resolution: "dotenv@npm:16.4.5" + checksum: 10c0/48d92870076832af0418b13acd6e5a5a3e83bb00df690d9812e94b24aff62b88ade955ac99a05501305b8dc8f1b0ee7638b18493deb6fe93d680e5220936292f + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -3237,6 +3563,15 @@ __metadata: languageName: node linkType: hard +"end-of-stream@npm:^1.1.0": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: "npm:^1.4.0" + checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 + languageName: node + linkType: hard + "enhanced-resolve@npm:^5.12.0": version: 5.17.0 resolution: "enhanced-resolve@npm:5.17.0" @@ -3660,6 +3995,16 @@ __metadata: languageName: node linkType: hard +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + languageName: node + linkType: hard + "esquery@npm:^1.4.2": version: 1.5.0 resolution: "esquery@npm:1.5.0" @@ -3706,7 +4051,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.1": +"fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.1": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -3925,6 +4270,15 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^5.1.0": + version: 5.2.0 + resolution: "get-stream@npm:5.2.0" + dependencies: + pump: "npm:^3.0.0" + checksum: 10c0/43797ffd815fbb26685bf188c8cfebecb8af87b3925091dd7b9a9c915993293d78e3c9e1bce125928ff92f2d0796f3889b92b5ec6d58d1041b574682132e0a80 + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.2": version: 1.0.2 resolution: "get-symbol-description@npm:1.0.2" @@ -4064,6 +4418,25 @@ __metadata: languageName: node linkType: hard +"got@npm:^11.7.0": + version: 11.8.6 + resolution: "got@npm:11.8.6" + dependencies: + "@sindresorhus/is": "npm:^4.0.0" + "@szmarczak/http-timer": "npm:^4.0.5" + "@types/cacheable-request": "npm:^6.0.1" + "@types/responselike": "npm:^1.0.0" + cacheable-lookup: "npm:^5.0.3" + cacheable-request: "npm:^7.0.2" + decompress-response: "npm:^6.0.0" + http2-wrapper: "npm:^1.0.0-beta.5.2" + lowercase-keys: "npm:^2.0.0" + p-cancelable: "npm:^2.0.0" + responselike: "npm:^2.0.0" + checksum: 10c0/754dd44877e5cf6183f1e989ff01c648d9a4719e357457bd4c78943911168881f1cfb7b2cb15d885e2105b3ad313adb8f017a67265dd7ade771afdb261ee8cb1 + languageName: node + linkType: hard + "graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -4071,6 +4444,13 @@ __metadata: languageName: node linkType: hard +"grapheme-splitter@npm:^1.0.4": + version: 1.0.4 + resolution: "grapheme-splitter@npm:1.0.4" + checksum: 10c0/108415fb07ac913f17040dc336607772fcea68c7f495ef91887edddb0b0f5ff7bc1d1ab181b125ecb2f0505669ef12c9a178a3bbd2dd8e042d8c5f1d7c90331a + languageName: node + linkType: hard + "graphemer@npm:^1.4.0": version: 1.4.0 resolution: "graphemer@npm:1.4.0" @@ -4149,7 +4529,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.1": +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc @@ -4166,6 +4546,16 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: "npm:^5.1.1" + resolve-alpn: "npm:^1.0.0" + checksum: 10c0/6a9b72a033e9812e1476b9d776ce2f387bc94bc46c88aea0d5dab6bd47d0a539b8178830e77054dd26d1142c866d515a28a4dc7c3ff4232c88ff2ebe4f5d12d1 + languageName: node + linkType: hard + "https-proxy-agent@npm:^7.0.1": version: 7.0.4 resolution: "https-proxy-agent@npm:7.0.4" @@ -4576,6 +4966,18 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^3.10.0": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + languageName: node + linkType: hard + "js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" @@ -4672,7 +5074,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.0.0, keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -4751,6 +5153,13 @@ __metadata: languageName: node linkType: hard +"lodash@npm:^4.17.15": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c + languageName: node + linkType: hard + "loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" @@ -4778,6 +5187,13 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "lowercase-keys@npm:2.0.0" + checksum: 10c0/f82a2b3568910509da4b7906362efa40f5b54ea14c2584778ddb313226f9cbf21020a5db35f9b9a0e95847a9b781d548601f31793d736b22a2b8ae8eb9ab1082 + languageName: node + linkType: hard + "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.2.2 resolution: "lru-cache@npm:10.2.2" @@ -4864,7 +5280,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5": version: 4.0.7 resolution: "micromatch@npm:4.0.7" dependencies: @@ -4904,6 +5320,20 @@ __metadata: languageName: node linkType: hard +"mimic-response@npm:^1.0.0": + version: 1.0.1 + resolution: "mimic-response@npm:1.0.1" + checksum: 10c0/c5381a5eae997f1c3b5e90ca7f209ed58c3615caeee850e85329c598f0c000ae7bec40196580eef1781c60c709f47258131dab237cad8786f8f56750594f27fa + languageName: node + linkType: hard + +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 10c0/0d6f07ce6e03e9e4445bee655202153bdb8a98d67ee8dc965ac140900d7a2688343e6b4c9a72cfc9ef2f7944dfd76eef4ab2482eb7b293a68b84916bac735362 + languageName: node + linkType: hard + "minimatch@npm:9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" @@ -5226,6 +5656,13 @@ __metadata: languageName: node linkType: hard +"normalize-url@npm:^6.0.1": + version: 6.1.0 + resolution: "normalize-url@npm:6.1.0" + checksum: 10c0/95d948f9bdd2cfde91aa786d1816ae40f8262946e13700bf6628105994fe0ff361662c20af3961161c38a119dc977adeb41fc0b41b1745eb77edaaf9cb22db23 + languageName: node + linkType: hard + "nth-check@npm:^2.0.1": version: 2.1.1 resolution: "nth-check@npm:2.1.1" @@ -5338,7 +5775,7 @@ __metadata: languageName: node linkType: hard -"once@npm:^1.3.0": +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -5361,6 +5798,13 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 10c0/8c6dc1f8dd4154fd8b96a10e55a3a832684c4365fb9108056d89e79fbf21a2465027c04a59d0d797b5ffe10b54a61a32043af287d5c4860f1e996cbdbc847f01 + languageName: node + linkType: hard + "p-defer@npm:^1.0.0": version: 1.0.0 resolution: "p-defer@npm:1.0.0" @@ -5368,6 +5812,15 @@ __metadata: languageName: node linkType: hard +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: "npm:^2.0.0" + checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 + languageName: node + linkType: hard + "p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -5395,6 +5848,13 @@ __metadata: languageName: node linkType: hard +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -5637,6 +6097,16 @@ __metadata: languageName: node linkType: hard +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: "npm:^1.1.0" + once: "npm:^1.3.1" + checksum: 10c0/bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478 + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -5651,6 +6121,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: 10c0/a24cba5da8cec30d70d2484be37622580f64765fb6390a928b17f60cd69e8dbd32a954b3ff9176fa1b86d86ff2ba05252fae55dc4d40d0291c60412b0ad096da + languageName: node + linkType: hard + "react-calendar@npm:^5.0.0": version: 5.0.0 resolution: "react-calendar@npm:5.0.0" @@ -5837,6 +6314,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: 10c0/b70b29c1843bc39781ef946c8cd4482e6d425976599c0f9c138cec8209e4e0736161bf39319b01676a847000085dfdaf63583c6fb4427bf751a10635bd2aa0c4 + languageName: node + linkType: hard + "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -5903,6 +6387,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" + dependencies: + lowercase-keys: "npm:^2.0.0" + checksum: 10c0/360b6deb5f101a9f8a4174f7837c523c3ec78b7ca8a7c1d45a1062b303659308a23757e318b1e91ed8684ad1205721142dd664d94771cd63499353fd4ee732b5 + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -5985,7 +6478,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:^7.1.2, semver@npm:^7.3.5, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.2 resolution: "semver@npm:7.6.2" bin: @@ -6121,6 +6614,13 @@ __metadata: languageName: node linkType: hard +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb + languageName: node + linkType: hard + "ssri@npm:^10.0.0": version: 10.0.6 resolution: "ssri@npm:10.0.6" @@ -6393,7 +6893,7 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.11, tar@npm:^6.1.2": +"tar@npm:^6.0.5, tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.1 resolution: "tar@npm:6.2.1" dependencies: @@ -6432,6 +6932,13 @@ __metadata: languageName: node linkType: hard +"tinylogic@npm:^2.0.0": + version: 2.0.0 + resolution: "tinylogic@npm:2.0.0" + checksum: 10c0/c9417c4b65dfc469c71c9eba4d43d44813ab8baceb80ba2c0e6c286de2e93e9c4b8522e4b0a7b91cb4a85353368ee93838a862262ce54bac431b884e694d1c89 + languageName: node + linkType: hard + "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -6448,6 +6955,13 @@ __metadata: languageName: node linkType: hard +"treeify@npm:^1.1.0": + version: 1.1.0 + resolution: "treeify@npm:1.1.0" + checksum: 10c0/2f0dea9e89328b8a42296a3963d341ab19897a05b723d6b0bced6b28701a340d2a7b03241aef807844198e46009aaf3755139274eb082cfce6fdc1935cbd69dd + languageName: node + linkType: hard + "ts-api-utils@npm:^1.0.1, ts-api-utils@npm:^1.3.0": version: 1.3.0 resolution: "ts-api-utils@npm:1.3.0" @@ -6490,6 +7004,20 @@ __metadata: languageName: node linkType: hard +"tunnel@npm:^0.0.6": + version: 0.0.6 + resolution: "tunnel@npm:0.0.6" + checksum: 10c0/e27e7e896f2426c1c747325b5f54efebc1a004647d853fad892b46d64e37591ccd0b97439470795e5262b5c0748d22beb4489a04a0a448029636670bfd801b75 + languageName: node + linkType: hard + +"typanion@npm:^3.8.0": + version: 3.14.0 + resolution: "typanion@npm:3.14.0" + checksum: 10c0/8b03b19844e6955bfd906c31dc781bae6d7f1fb3ce4fe24b7501557013d4889ae5cefe671dafe98d87ead0adceb8afcb8bc16df7dc0bd2b7331bac96f3a7cae2 + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -6714,6 +7242,7 @@ __metadata: "@types/node": "npm:20.14.2" "@types/react": "npm:18.3.3" "@types/styled-components": "npm:^5.1.34" + "@yarnpkg/pnpify": "npm:^4.1.0" autoprefixer: "npm:^10.4.19" axios: "npm:^1.6.2" embla-carousel-autoplay: "npm:^8.1.3" From 76bc8d3358a0db167d8b4a77b63b3f79821937ba Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 24 Jun 2024 14:16:01 +0900 Subject: [PATCH 09/46] =?UTF-8?q?#16=20fix:=20build=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/challenge/ChallengeCalendar.tsx | 2 +- package.json | 2 +- pages/login.tsx | 1 - yarn.lock | 287 ++++++++++++++------- 4 files changed, 189 insertions(+), 103 deletions(-) diff --git a/components/challenge/ChallengeCalendar.tsx b/components/challenge/ChallengeCalendar.tsx index 884fca9..0e78857 100644 --- a/components/challenge/ChallengeCalendar.tsx +++ b/components/challenge/ChallengeCalendar.tsx @@ -21,7 +21,7 @@ export default function ChallengeCalendar() { return (
- +
); diff --git a/package.json b/package.json index 3e6b78f..1509ada 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "@types/gh-pages": "^6", "@types/node": "20.14.2", "@types/react": "18.3.3", - "@yarnpkg/pnpify": "^4.1.0", "@types/react-modal": "^3", + "@yarnpkg/pnpify": "^4.1.0", "eslint": "8.54.0", "eslint-config-next": "14.0.3", "typescript": "5.4.5" diff --git a/pages/login.tsx b/pages/login.tsx index e43116b..e7de528 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -32,7 +32,6 @@ const Login: NextPage = () => { if (idValue.trim() == "") { alert("아이디를 입력해주세요."); } else if (pwValue.trim() == "") { - // createChatting(inputValue); alert("비밀번호를 입력해주세요."); } else { //api diff --git a/yarn.lock b/yarn.lock index 4f167d5..a907bab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1447,7 +1447,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": +"@babel/runtime@npm:^7.23.8, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": version: 7.24.7 resolution: "@babel/runtime@npm:7.24.7" dependencies: @@ -2013,21 +2013,21 @@ __metadata: languageName: node linkType: hard -"@tanstack/query-core@npm:5.40.0": - version: 5.40.0 - resolution: "@tanstack/query-core@npm:5.40.0" - checksum: 10c0/8ed200657dcdc1c05a44571be07e7a9d9a6c19c4ac067560bfb9d065a9cfb3e0dbbd0c44c17814272fd0b8d559030e9f4b50fb917c4312bbe61c9848767fde38 +"@tanstack/query-core@npm:5.45.0": + version: 5.45.0 + resolution: "@tanstack/query-core@npm:5.45.0" + checksum: 10c0/b1adb0e44a6294f8fc63d1f3915e657e29799ae761012a49430f2694f9fd4f7041984949f61d412ad43e5aaba3ea880ab89b3d2c309cb2860a2913029e9062e9 languageName: node linkType: hard "@tanstack/react-query@npm:^5.40.1": - version: 5.40.1 - resolution: "@tanstack/react-query@npm:5.40.1" + version: 5.45.1 + resolution: "@tanstack/react-query@npm:5.45.1" dependencies: - "@tanstack/query-core": "npm:5.40.0" + "@tanstack/query-core": "npm:5.45.0" peerDependencies: react: ^18.0.0 - checksum: 10c0/1585b29127762a57181b0c9bc79711eed08dd6d108441d092a568cd094774ee367d896e885cc92d7ca2fd424c95225c347db4b4e2e62718e665272c1f199bf03 + checksum: 10c0/39968d90bfe365ea0a1bff64caaf065fc8ea3304ae450a055265e235e461bd82bbe3dc9182d32062ecb48c45e2d679ee87909489bde9b9e7b09ed7c41e81fd93 languageName: node linkType: hard @@ -2054,6 +2054,9 @@ __metadata: version: 1.39.13 resolution: "@types/emscripten@npm:1.39.13" checksum: 10c0/99c314418b6fbe113c4c81dc89501bdf723020d1de262a36a4e45236b268dcec3deab104e3a7d3569e6d7c5c942de30c9c6d77b93170c1bcaa85620c7ee4c2ba + languageName: node + linkType: hard + "@types/gh-pages@npm:^6": version: 6.1.0 resolution: "@types/gh-pages@npm:6.1.0" @@ -2463,11 +2466,11 @@ __metadata: linkType: hard "acorn@npm:^8.9.0": - version: 8.11.3 - resolution: "acorn@npm:8.11.3" + version: 8.12.0 + resolution: "acorn@npm:8.12.0" bin: acorn: bin/acorn - checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 + checksum: 10c0/a19f9dead009d3b430fa3c253710b47778cdaace15b316de6de93a68c355507bc1072a9956372b6c990cbeeb167d4a929249d0faeb8ae4bb6911d68d53299549 languageName: node linkType: hard @@ -2581,16 +2584,16 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.3.0": - version: 5.3.0 - resolution: "aria-query@npm:5.3.0" +"aria-query@npm:~5.1.3": + version: 5.1.3 + resolution: "aria-query@npm:5.1.3" dependencies: - dequal: "npm:^2.0.3" - checksum: 10c0/2bff0d4eba5852a9dd578ecf47eaef0e82cc52569b48469b0aac2db5145db0b17b7a58d9e01237706d1e14b7a1b0ac9b78e9c97027ad97679dd8f91b85da1469 + deep-equal: "npm:^2.0.5" + checksum: 10c0/edcbc8044c4663d6f88f785e983e6784f98cb62b4ba1e9dd8d61b725d0203e4cfca38d676aee984c31f354103461102a3d583aa4fbe4fd0a89b679744f4e5faf languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -2701,7 +2704,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.tosorted@npm:^1.1.3": +"array.prototype.tosorted@npm:^1.1.4": version: 1.1.4 resolution: "array.prototype.tosorted@npm:1.1.4" dependencies: @@ -2778,10 +2781,10 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:=4.7.0": - version: 4.7.0 - resolution: "axe-core@npm:4.7.0" - checksum: 10c0/89ac5712b5932ac7d23398b4cb5ba081c394a086e343acc68ba49c83472706e18e0799804e8388c779dcdacc465377deb29f2714241d3fbb389cf3a6b275c9ba +"axe-core@npm:^4.9.1": + version: 4.9.1 + resolution: "axe-core@npm:4.9.1" + checksum: 10c0/ac9e5a0c6fa115a43ebffc32a1d2189e1ca6431b5a78e88cdcf94a72a25c5964185682edd94fe6bdb1cb4266c0d06301b022866e0e50dcdf6e3cefe556470110 languageName: node linkType: hard @@ -2796,12 +2799,12 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:^3.2.1": - version: 3.2.1 - resolution: "axobject-query@npm:3.2.1" +"axobject-query@npm:~3.1.1": + version: 3.1.1 + resolution: "axobject-query@npm:3.1.1" dependencies: - dequal: "npm:^2.0.3" - checksum: 10c0/f7debc2012e456139b57d888c223f6d3cb4b61eb104164a85e3d346273dd6ef0bc9a04b6660ca9407704a14a8e05fa6b6eb9d55f44f348c7210de7ffb350c3a7 + deep-equal: "npm:^2.0.5" + checksum: 10c0/fff3175a22fd1f41fceb7ae0cd25f6594a0d7fba28c2335dd904538b80eb4e1040432564a3c643025cd2bb748f68d35aaabffb780b794da97ecfc748810b25ad languageName: node linkType: hard @@ -3018,9 +3021,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001599, caniuse-lite@npm:^1.0.30001629": - version: 1.0.30001632 - resolution: "caniuse-lite@npm:1.0.30001632" - checksum: 10c0/960af2c7ed4367d6b72a164ecb9050ea9eada28c61e2134baaa712862364b9b6b41247c3ff4c2a497f91e879c5a1c9c7713080ac2d0c72eb4bee5ef2f4e24d62 + version: 1.0.30001636 + resolution: "caniuse-lite@npm:1.0.30001636" + checksum: 10c0/e5f965b4da7bae1531fd9f93477d015729ff9e3fa12670ead39a9e6cdc4c43e62c272d47857c5cc332e7b02d697cb3f2f965a1030870ac7476da60c2fc81ee94 languageName: node linkType: hard @@ -3395,6 +3398,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:^2.0.5": + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.0" + call-bind: "npm:^1.0.5" + es-get-iterator: "npm:^1.1.3" + get-intrinsic: "npm:^1.2.2" + is-arguments: "npm:^1.1.1" + is-array-buffer: "npm:^3.0.2" + is-date-object: "npm:^1.0.5" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.2" + isarray: "npm:^2.0.5" + object-is: "npm:^1.1.5" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.4" + regexp.prototype.flags: "npm:^1.5.1" + side-channel: "npm:^1.0.4" + which-boxed-primitive: "npm:^1.0.2" + which-collection: "npm:^1.0.1" + which-typed-array: "npm:^1.1.13" + checksum: 10c0/a48244f90fa989f63ff5ef0cc6de1e4916b48ea0220a9c89a378561960814794a5800c600254482a2c8fd2e49d6c2e196131dc983976adb024c94a42dfe4949f + languageName: node + linkType: hard + "deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" @@ -3427,7 +3456,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -3445,13 +3474,6 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.3": - version: 2.0.3 - resolution: "dequal@npm:2.0.3" - checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 - languageName: node - linkType: hard - "detect-node@npm:^2.0.4, detect-node@npm:^2.1.0": version: 2.1.0 resolution: "detect-node@npm:2.1.0" @@ -3570,9 +3592,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.796": - version: 1.4.799 - resolution: "electron-to-chromium@npm:1.4.799" - checksum: 10c0/d347e48f8844f983ab91a7a20455013731e91dabe01286bc77f0b8ec5e1d3158aca2473da79209890d139bb3a166019147ffdb9f5c8fbf5564fbf416aaaf6ed8 + version: 1.4.810 + resolution: "electron-to-chromium@npm:1.4.810" + checksum: 10c0/0fed53e156aab30d71f2d6fd3bcd818755cee6aab3316e497c1f92424b4ef628f9faf1cf3cc2b4bcacc91c6a58d4e610202c4aa23cf91d7fbe77f82144bdc0ba languageName: node linkType: hard @@ -3584,39 +3606,39 @@ __metadata: linkType: hard "embla-carousel-autoplay@npm:^8.1.3": - version: 8.1.3 - resolution: "embla-carousel-autoplay@npm:8.1.3" + version: 8.1.5 + resolution: "embla-carousel-autoplay@npm:8.1.5" peerDependencies: - embla-carousel: 8.1.3 - checksum: 10c0/7b56a5a2e05018f5908201b110f498ca93f140027dad943620d37cf58ebe73dccd4b8571693c1a6deb8e2f29551deb8eb6e297e92e78657824e3fc6e44e2cd07 + embla-carousel: 8.1.5 + checksum: 10c0/1798bdff3684e579cadabe5e2667405a0313dd348d398194f958a7e4d840d256026e9650856bbd4045d785b04ec4a02fa0f9e7f598cfd6b68f13689dbd497812 languageName: node linkType: hard "embla-carousel-react@npm:^8.1.3": - version: 8.1.3 - resolution: "embla-carousel-react@npm:8.1.3" + version: 8.1.5 + resolution: "embla-carousel-react@npm:8.1.5" dependencies: - embla-carousel: "npm:8.1.3" - embla-carousel-reactive-utils: "npm:8.1.3" + embla-carousel: "npm:8.1.5" + embla-carousel-reactive-utils: "npm:8.1.5" peerDependencies: react: ^16.8.0 || ^17.0.1 || ^18.0.0 - checksum: 10c0/8ed58131adbf8f80b4db340a82a9c658d8a4f6cee087a671e0a666f5f06713ef545fab27f9cca844b91a6503d3bc1ec19f0743ea4fe46902caaa6d9ed8c532d9 + checksum: 10c0/a8c64e948f7bbe11a5d62ca4ebd70030a7a0dea2d772ab0c545026f2facea493bd5ddabccdb915922ed41f8af44d61140ae485521fb3495af8e13d7e43405aed languageName: node linkType: hard -"embla-carousel-reactive-utils@npm:8.1.3": - version: 8.1.3 - resolution: "embla-carousel-reactive-utils@npm:8.1.3" +"embla-carousel-reactive-utils@npm:8.1.5": + version: 8.1.5 + resolution: "embla-carousel-reactive-utils@npm:8.1.5" peerDependencies: - embla-carousel: 8.1.3 - checksum: 10c0/3f39e87d2324092a585f2edcac40bf49eda81b3dc23fc9f35cc565e8a163831099ebc40f8eaf1c792df2bdd7598a958ff0664eb0eb828b3dfef0ae630a8dd43b + embla-carousel: 8.1.5 + checksum: 10c0/813a358f7372ddeb7a49e637e21b1580bda42797f97cbb8f7a2ad63a1803b0f2a9d2ecd5f0c088bd2447bb0a6c932f31e5c820698d83324a23548bd9242deb41 languageName: node linkType: hard -"embla-carousel@npm:8.1.3": - version: 8.1.3 - resolution: "embla-carousel@npm:8.1.3" - checksum: 10c0/f215d2596eae6485f6b13c70808cf6bd87bcec96cbb402520edbe40657faaae2dc044cd88f04968854a42080f00f76a2e58b38e486f5ca43719de62628f9107b +"embla-carousel@npm:8.1.5": + version: 8.1.5 + resolution: "embla-carousel@npm:8.1.5" + checksum: 10c0/5fa18cf332654ce3f380874e41caa6a520a04c5d43f2832f1d797b74e822f271de61f27346155fc3a8321633f1968b7b808ad0d56152305c8696ff5d12d3200f languageName: node linkType: hard @@ -3692,7 +3714,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -3762,7 +3784,24 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.19": +"es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" + dependencies: + call-bind: "npm:^1.0.2" + get-intrinsic: "npm:^1.1.3" + has-symbols: "npm:^1.0.3" + is-arguments: "npm:^1.1.1" + is-map: "npm:^2.0.2" + is-set: "npm:^2.0.2" + is-string: "npm:^1.0.7" + isarray: "npm:^2.0.5" + stop-iteration-iterator: "npm:^1.0.0" + checksum: 10c0/ebd11effa79851ea75d7f079405f9d0dc185559fd65d986c6afea59a0ff2d46c2ed8675f19f03dce7429d7f6c14ff9aede8d121fbab78d75cfda6a263030bac0 + languageName: node + linkType: hard + +"es-iterator-helpers@npm:^1.0.19": version: 1.0.19 resolution: "es-iterator-helpers@npm:1.0.19" dependencies: @@ -3937,28 +3976,28 @@ __metadata: linkType: hard "eslint-plugin-jsx-a11y@npm:^6.7.1": - version: 6.8.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" + version: 6.9.0 + resolution: "eslint-plugin-jsx-a11y@npm:6.9.0" dependencies: - "@babel/runtime": "npm:^7.23.2" - aria-query: "npm:^5.3.0" - array-includes: "npm:^3.1.7" + aria-query: "npm:~5.1.3" + array-includes: "npm:^3.1.8" array.prototype.flatmap: "npm:^1.3.2" ast-types-flow: "npm:^0.0.8" - axe-core: "npm:=4.7.0" - axobject-query: "npm:^3.2.1" + axe-core: "npm:^4.9.1" + axobject-query: "npm:~3.1.1" damerau-levenshtein: "npm:^1.0.8" emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.15" - hasown: "npm:^2.0.0" + es-iterator-helpers: "npm:^1.0.19" + hasown: "npm:^2.0.2" jsx-ast-utils: "npm:^3.3.5" language-tags: "npm:^1.0.9" minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.7" - object.fromentries: "npm:^2.0.7" + object.fromentries: "npm:^2.0.8" + safe-regex-test: "npm:^1.0.3" + string.prototype.includes: "npm:^2.0.0" peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/199b883e526e6f9d7c54cb3f094abc54f11a1ec816db5fb6cae3b938eb0e503acc10ccba91ca7451633a9d0b9abc0ea03601844a8aba5fe88c5e8897c9ac8f49 + checksum: 10c0/72ac719ca90b6149c8f3c708ac5b1177f6757668b6e174d72a78512d4ac10329331b9c666c21e9561237a96a45d7f147f6a5d270dadbb99eb4ee093f127792c3 languageName: node linkType: hard @@ -3972,14 +4011,14 @@ __metadata: linkType: hard "eslint-plugin-react@npm:^7.33.2": - version: 7.34.2 - resolution: "eslint-plugin-react@npm:7.34.2" + version: 7.34.3 + resolution: "eslint-plugin-react@npm:7.34.3" dependencies: array-includes: "npm:^3.1.8" array.prototype.findlast: "npm:^1.2.5" array.prototype.flatmap: "npm:^1.3.2" array.prototype.toreversed: "npm:^1.1.2" - array.prototype.tosorted: "npm:^1.1.3" + array.prototype.tosorted: "npm:^1.1.4" doctrine: "npm:^2.1.0" es-iterator-helpers: "npm:^1.0.19" estraverse: "npm:^5.3.0" @@ -3995,7 +4034,7 @@ __metadata: string.prototype.matchall: "npm:^4.0.11" peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 10c0/37dc04424da8626f20a071466e7238d53ed111c53e5e5398d813ac2cf76a2078f00d91f7833fe5b2f0fc98f2688a75b36e78e9ada9f1068705d23c7031094316 + checksum: 10c0/60717e32c9948e2b4ddc53dac7c4b62c68fc7129c3249079191c941c08ebe7d1f4793d65182922d19427c2a6634e05231a7b74ceee34169afdfd0e43d4a43d26 languageName: node linkType: hard @@ -4303,12 +4342,12 @@ __metadata: linkType: hard "foreground-child@npm:^3.1.0": - version: 3.1.1 - resolution: "foreground-child@npm:3.1.1" + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" dependencies: cross-spawn: "npm:^7.0.0" signal-exit: "npm:^4.0.1" - checksum: 10c0/9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0 + checksum: 10c0/9a53a33dbd87090e9576bef65fb4a71de60f6863a8062a7b11bc1cbe3cc86d428677d7c0b9ef61cdac11007ac580006f78bd5638618d564cfd5e6fd713d6878f languageName: node linkType: hard @@ -4418,7 +4457,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -4520,17 +4559,18 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.4.1 - resolution: "glob@npm:10.4.1" + version: 10.4.2 + resolution: "glob@npm:10.4.2" dependencies: foreground-child: "npm:^3.1.0" jackspeak: "npm:^3.1.2" minimatch: "npm:^9.0.4" minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" path-scurry: "npm:^1.11.1" bin: glob: dist/esm/bin.mjs - checksum: 10c0/77f2900ed98b9cc2a0e1901ee5e476d664dae3cd0f1b662b8bfd4ccf00d0edc31a11595807706a274ca10e1e251411bbf2e8e976c82bed0d879a9b89343ed379 + checksum: 10c0/2c7296695fa75a935f3ad17dc62e4e170a8bb8752cf64d328be8992dd6ad40777939003754e10e9741ff8fbe43aa52fba32d6930d0ffa0e3b74bc3fb5eebaa2f languageName: node linkType: hard @@ -4629,7 +4669,6 @@ __metadata: languageName: node linkType: hard - "graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -4816,7 +4855,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -4837,7 +4876,17 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.4": +"is-arguments@npm:^1.1.1": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/5ff1f341ee4475350adfc14b2328b38962564b7c2076be2f5bac7bd9b61779efba99b9f844a7b82ba7654adccf8e8eb19d1bb0cc6d1c1a085e498f6793d4328f + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -4899,11 +4948,11 @@ __metadata: linkType: hard "is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" + version: 2.14.0 + resolution: "is-core-module@npm:2.14.0" dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 + hasown: "npm:^2.0.2" + checksum: 10c0/ae8dbc82bd20426558bc8d20ce290ce301c1cfd6ae4446266d10cacff4c63c67ab16440ade1d72ced9ec41c569fbacbcee01e293782ce568527c4cdf35936e4c languageName: node linkType: hard @@ -4973,7 +5022,7 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.3": +"is-map@npm:^2.0.2, is-map@npm:^2.0.3": version: 2.0.3 resolution: "is-map@npm:2.0.3" checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc @@ -5020,7 +5069,7 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.3": +"is-set@npm:^2.0.2, is-set@npm:^2.0.3": version: 2.0.3 resolution: "is-set@npm:2.0.3" checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 @@ -5926,9 +5975,19 @@ __metadata: linkType: hard "object-inspect@npm:^1.13.1": - version: 1.13.1 - resolution: "object-inspect@npm:1.13.1" - checksum: 10c0/fad603f408e345c82e946abdf4bfd774260a5ed3e5997a0b057c44153ac32c7271ff19e3a5ae39c858da683ba045ccac2f65245c12763ce4e8594f818f4a648d + version: 1.13.2 + resolution: "object-inspect@npm:1.13.2" + checksum: 10c0/b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 + languageName: node + linkType: hard + +"object-is@npm:^1.1.5": + version: 1.1.6 + resolution: "object-is@npm:1.1.6" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + checksum: 10c0/506af444c4dce7f8e31f34fc549e2fb8152d6b9c4a30c6e62852badd7f520b579c679af433e7a072f9d78eb7808d230dc12e1cf58da9154dfbf8813099ea0fe0 languageName: node linkType: hard @@ -5951,7 +6010,7 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.7, object.entries@npm:^1.1.8": +"object.entries@npm:^1.1.8": version: 1.1.8 resolution: "object.entries@npm:1.1.8" dependencies: @@ -6103,6 +6162,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: 10c0/e3ffaf6ac1040ab6082a658230c041ad14e72fabe99076a2081bb1d5d41210f11872403fc09082daf4387fc0baa6577f96c9c0e94c90c394fd57794b66aa4033 + languageName: node + linkType: hard + "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -6565,7 +6631,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": version: 1.5.2 resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: @@ -6925,6 +6991,15 @@ __metadata: languageName: node linkType: hard +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: "npm:^1.0.4" + checksum: 10c0/c4158d6188aac510d9e92925b58709207bd94699e9c31186a040c80932a687f84a51356b5895e6dc72710aad83addb9411c22171832c9ae0e6e11b7d61b0dfb9 + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -6947,6 +7022,16 @@ __metadata: languageName: node linkType: hard +"string.prototype.includes@npm:^2.0.0": + version: 2.0.0 + resolution: "string.prototype.includes@npm:2.0.0" + dependencies: + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.17.5" + checksum: 10c0/32dff118c9e9dcc87e240b05462fa8ee7248d9e335c0015c1442fe18152261508a2146d9bb87ddae56abab69148a83c61dfaea33f53853812a6a2db737689ed2 + languageName: node + linkType: hard + "string.prototype.matchall@npm:^4.0.11": version: 4.0.11 resolution: "string.prototype.matchall@npm:4.0.11" @@ -7263,6 +7348,8 @@ __metadata: version: 1.1.0 resolution: "treeify@npm:1.1.0" checksum: 10c0/2f0dea9e89328b8a42296a3963d341ab19897a05b723d6b0bced6b28701a340d2a7b03241aef807844198e46009aaf3755139274eb082cfce6fdc1935cbd69dd + languageName: node + linkType: hard "trim-repeated@npm:^1.0.0": version: 1.0.0 @@ -7634,7 +7721,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.9": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: From e0f4f45d67f315dd4646f64b2d5c132c7e406b86 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 24 Jun 2024 16:21:24 +0900 Subject: [PATCH 10/46] =?UTF-8?q?#16=20login=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/auth.ts | 21 +++++++++++++++++ apis/client.ts | 2 +- pages/login.tsx | 60 ++++++++++++++++++++++++++++++++++++------------- 3 files changed, 66 insertions(+), 17 deletions(-) create mode 100644 apis/auth.ts diff --git a/apis/auth.ts b/apis/auth.ts new file mode 100644 index 0000000..f76daa9 --- /dev/null +++ b/apis/auth.ts @@ -0,0 +1,21 @@ +import client from "./client"; + +export const Signin = async (userData: { + loginId: String; + password: String; +}) => { + const response = await client.post( + "/users/login", + { + loginId: userData.loginId, + password: userData.password, + }, + { + headers: { + "Content-Type": "application/json", + "no-auth": "true", + }, + }, + ); + return response.data; +}; diff --git a/apis/client.ts b/apis/client.ts index b02a3af..dfd1c91 100644 --- a/apis/client.ts +++ b/apis/client.ts @@ -6,7 +6,7 @@ interface ResponseBody { message: string; } -const setTokenFromLocalStorage = (access_token: string) => { +export const setTokenFromLocalStorage = (access_token: string) => { localStorage.setItem("access_token", access_token); }; diff --git a/pages/login.tsx b/pages/login.tsx index e7de528..70dfd13 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -4,23 +4,30 @@ import { NextPage } from "next"; import { useRouter } from "next/router"; import Button from "@/components/Button"; import LogoLetterIcon from "@/public/svgs/LogoLetter.svg"; +import { useMutation } from "@tanstack/react-query"; +import { ResponseBody, setTokenFromLocalStorage } from "@/apis/client"; +import { Signin } from "@/apis/auth"; + +interface userProps { + loginId: String; + password: String; +} const Login: NextPage = () => { const router = useRouter(); - const [idValue, setIDValue] = useState(""); - const [pwValue, setPWValue] = useState(""); + const [userInfo, setUserInfo] = useState({ + loginId: "", + password: "", + }); + const idInputRef = useRef(null); const pwInputRef = useRef(null); //input 함수 //onChange - const onChangeID = (e: React.ChangeEvent) => { - setIDValue(e.target.value); - }; - - const onChangePW = (e: React.ChangeEvent) => { - setPWValue(e.target.value); + const onChange = (e: React.ChangeEvent) => { + setUserInfo({ ...userInfo, [e.target.name]: e.target.value }); }; //onSubmit @@ -29,17 +36,36 @@ const Login: NextPage = () => { e.preventDefault(); //입력한 값이 없을 때 alert 추가 - if (idValue.trim() == "") { + if (userInfo.loginId.trim() == "") { alert("아이디를 입력해주세요."); - } else if (pwValue.trim() == "") { + } else if (userInfo.password.trim() == "") { alert("비밀번호를 입력해주세요."); } else { - //api + signInMutation.mutate({ + loginId: userInfo.loginId, + password: userInfo.password, + }); } }, - [idValue, pwValue], + [userInfo], ); + const signInMutation = useMutation({ + mutationFn: Signin, + onSuccess: async (data) => { + console.log(data); + const accessToken = data.result.accessToken; + const refreshToken = data.result.refreshToken; + console.log("accessToken:", accessToken); + setTokenFromLocalStorage(accessToken); + router.push("/"); + alert("로그인에 성공하였습니다"); + }, + onError: (error) => { + alert("로그인에 실패하였습니다"); + }, + }); + return (
@@ -51,17 +77,19 @@ const Login: NextPage = () => {
From c77e29466f2d9b09d0a8836cc1ce09aa1dad3631 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 24 Jun 2024 16:58:51 +0900 Subject: [PATCH 11/46] =?UTF-8?q?#16=20feat:=20alert->required=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/auth.ts | 21 --------------------- apis/auth.tsx | 35 +++++++++++++++++++++++++++++++++++ pages/login.tsx | 21 ++++++++------------- pages/main.tsx | 6 +++--- pages/signup.tsx | 2 +- 5 files changed, 47 insertions(+), 38 deletions(-) delete mode 100644 apis/auth.ts create mode 100644 apis/auth.tsx diff --git a/apis/auth.ts b/apis/auth.ts deleted file mode 100644 index f76daa9..0000000 --- a/apis/auth.ts +++ /dev/null @@ -1,21 +0,0 @@ -import client from "./client"; - -export const Signin = async (userData: { - loginId: String; - password: String; -}) => { - const response = await client.post( - "/users/login", - { - loginId: userData.loginId, - password: userData.password, - }, - { - headers: { - "Content-Type": "application/json", - "no-auth": "true", - }, - }, - ); - return response.data; -}; diff --git a/apis/auth.tsx b/apis/auth.tsx new file mode 100644 index 0000000..90484c4 --- /dev/null +++ b/apis/auth.tsx @@ -0,0 +1,35 @@ +import client from "./client"; + +export const Signin = async (userData: { + loginId: string; + password: string; +}) => { + try { + const response = await client.post( + "/users/login", + { + loginId: userData.loginId, + password: userData.password, + }, + { + headers: { + "Content-Type": "application/json", + "no-auth": "true", + }, + }, + ); + return response.data; + } catch (error) { + if (error.response) { + //200 이 외 + console.error("서버 응답 오류:", error.response.data); + } else if (error.request) { + // 요청이 전송되었으나 응답을 받지 못한 경우 + console.error("응답 없음:", error.request); + } else { + // 요청을 설정하는 도중에 발생한 오류 + console.error("요청 설정 오류:", error.message); + } + throw error; + } +}; diff --git a/pages/login.tsx b/pages/login.tsx index 70dfd13..9590ecc 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -9,8 +9,8 @@ import { ResponseBody, setTokenFromLocalStorage } from "@/apis/client"; import { Signin } from "@/apis/auth"; interface userProps { - loginId: String; - password: String; + loginId: string; + password: string; } const Login: NextPage = () => { @@ -35,17 +35,10 @@ const Login: NextPage = () => { (e: React.FormEvent) => { e.preventDefault(); - //입력한 값이 없을 때 alert 추가 - if (userInfo.loginId.trim() == "") { - alert("아이디를 입력해주세요."); - } else if (userInfo.password.trim() == "") { - alert("비밀번호를 입력해주세요."); - } else { - signInMutation.mutate({ - loginId: userInfo.loginId, - password: userInfo.password, - }); - } + signInMutation.mutate({ + loginId: userInfo.loginId, + password: userInfo.password, + }); }, [userInfo], ); @@ -81,6 +74,7 @@ const Login: NextPage = () => { ref={idInputRef} value={userInfo.loginId} onChange={onChange} + required className="h-[3rem] w-[19.5rem] rounded-xl border border-solid border-semantic-grey-2 pl-[1rem]" /> @@ -90,6 +84,7 @@ const Login: NextPage = () => { ref={pwInputRef} value={userInfo.password} onChange={onChange} + required className="h-[3rem] w-[19.5rem] rounded-xl border border-solid border-semantic-grey-2 pl-[1rem]" />
diff --git a/pages/main.tsx b/pages/main.tsx index 5106ffe..315d8e9 100644 --- a/pages/main.tsx +++ b/pages/main.tsx @@ -9,15 +9,15 @@ const OnBoardingMain: NextPage = () => { return (
-
+
diff --git a/pages/signup.tsx b/pages/signup.tsx index 96f40cd..9bb1c4d 100644 --- a/pages/signup.tsx +++ b/pages/signup.tsx @@ -47,7 +47,7 @@ const SignUp: NextPage = () => { return (
- +
Date: Mon, 24 Jun 2024 17:19:26 +0900 Subject: [PATCH 12/46] =?UTF-8?q?#16=20fix:=20login=20=ED=95=A8=EC=88=98?= =?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 --- apis/auth.tsx | 3 +-- pages/login.tsx | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apis/auth.tsx b/apis/auth.tsx index 90484c4..a8f5757 100644 --- a/apis/auth.tsx +++ b/apis/auth.tsx @@ -1,6 +1,6 @@ import client from "./client"; -export const Signin = async (userData: { +export const SignIn = async (userData: { loginId: string; password: string; }) => { @@ -14,7 +14,6 @@ export const Signin = async (userData: { { headers: { "Content-Type": "application/json", - "no-auth": "true", }, }, ); diff --git a/pages/login.tsx b/pages/login.tsx index 9590ecc..a8c3474 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -6,7 +6,7 @@ import Button from "@/components/Button"; import LogoLetterIcon from "@/public/svgs/LogoLetter.svg"; import { useMutation } from "@tanstack/react-query"; import { ResponseBody, setTokenFromLocalStorage } from "@/apis/client"; -import { Signin } from "@/apis/auth"; +import { SignIn } from "@/apis/auth"; interface userProps { loginId: string; @@ -44,13 +44,13 @@ const Login: NextPage = () => { ); const signInMutation = useMutation({ - mutationFn: Signin, + mutationFn: SignIn, onSuccess: async (data) => { console.log(data); const accessToken = data.result.accessToken; const refreshToken = data.result.refreshToken; console.log("accessToken:", accessToken); - setTokenFromLocalStorage(accessToken); + // setTokenFromLocalStorage(accessToken); router.push("/"); alert("로그인에 성공하였습니다"); }, From eb80a3052e74b66a80715d811c3d858231bd18d9 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Mon, 24 Jun 2024 23:02:07 +0900 Subject: [PATCH 13/46] =?UTF-8?q?#16=20fix:=20login=ED=95=A0=EB=95=8C=20be?= =?UTF-8?q?arer=20null=20=ED=97=A4=EB=8D=94=EC=97=90=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/client.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apis/client.ts b/apis/client.ts index dfd1c91..c3dbd5a 100644 --- a/apis/client.ts +++ b/apis/client.ts @@ -33,8 +33,13 @@ const client = axios.create({ client.interceptors.request.use( async (config) => { if (typeof document !== "undefined") { - const token = getTokenFromLocalStorage(); - config.headers.set("Authorization", `Bearer ${token}`); + const loginUrl = "/users/login"; + if (!config.url.includes(loginUrl)) { + const token = getTokenFromLocalStorage(); + if (token) { + config.headers.set("Authorization", `Bearer ${token}`); + } + } } return config; }, From 749bf93eda45dc0741c680eb4dda4c0427ce70c8 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:52:00 +0900 Subject: [PATCH 14/46] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/profile.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/mypage/profile.tsx b/pages/mypage/profile.tsx index 23c09d3..8791e8a 100644 --- a/pages/mypage/profile.tsx +++ b/pages/mypage/profile.tsx @@ -30,8 +30,9 @@ const Profile: NextPage = () => { className="underline h5 text-gray-500 pt-4 pb-2" onClick={navigateToPasswordChange} > - 비밀번호 수정 + 로그아웃
+
비밀번호 수정
회원 탈퇴하기
From e9fff74d645100246513f41fc5be13343b04ebf0 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:52:52 +0900 Subject: [PATCH 15/46] =?UTF-8?q?chore:=20react-query=20devtools=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pages/_app.tsx | 13 +++++-------- yarn.lock | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1509ada..cdad378 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@svgr/webpack": "^8.1.0", "@tanstack/eslint-plugin-query": "^5.35.6", "@tanstack/react-query": "^5.40.1", + "@tanstack/react-query-devtools": "^5.45.1", "@types/styled-components": "^5.1.34", "autoprefixer": "^10.4.19", "axios": "^1.6.2", diff --git a/pages/_app.tsx b/pages/_app.tsx index 5808b6b..31bfd2f 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -3,22 +3,19 @@ import "@/styles/toast.css"; import "public/fonts/font.css"; // import "@/styles/Calendar.css"; import RootLayout from "@/components/Layout"; -import { - QueryClient, - QueryClientProvider, - QueryCache, -} from "@tanstack/react-query"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { AppProps } from "next/app"; -import React from "react"; -export default function App({ Component, pageProps }: AppProps) { - const [queryClient] = React.useState(() => new QueryClient()); +const queryClient = new QueryClient(); +export default function App({ Component, pageProps }: AppProps) { return ( + ); } diff --git a/yarn.lock b/yarn.lock index a907bab..f093ece 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2020,6 +2020,25 @@ __metadata: languageName: node linkType: hard +"@tanstack/query-devtools@npm:5.37.1": + version: 5.37.1 + resolution: "@tanstack/query-devtools@npm:5.37.1" + checksum: 10c0/c52c320972e2b430da69f18295ddb2c62ea5c3c1b83481b225be799f7e955e32782d68871bddc141acc468cf4d7ad5dcdd2c88ff3edc90021d28e57252dfab8b + languageName: node + linkType: hard + +"@tanstack/react-query-devtools@npm:^5.45.1": + version: 5.45.1 + resolution: "@tanstack/react-query-devtools@npm:5.45.1" + dependencies: + "@tanstack/query-devtools": "npm:5.37.1" + peerDependencies: + "@tanstack/react-query": ^5.45.1 + react: ^18 || ^19 + checksum: 10c0/db419ea421df0bdeeb89b3cd47edbd3e0b6107874897727fb2252ff3b6cf4a35d479bdb12d8497e441f471bc34aa6afa2fc262cdb023719b809c41832ef0f6b4 + languageName: node + linkType: hard + "@tanstack/react-query@npm:^5.40.1": version: 5.45.1 resolution: "@tanstack/react-query@npm:5.45.1" @@ -7645,6 +7664,7 @@ __metadata: "@svgr/webpack": "npm:^8.1.0" "@tanstack/eslint-plugin-query": "npm:^5.35.6" "@tanstack/react-query": "npm:^5.40.1" + "@tanstack/react-query-devtools": "npm:^5.45.1" "@types/gh-pages": "npm:^6" "@types/node": "npm:20.14.2" "@types/react": "npm:18.3.3" From b6e0458bc7c27a97b61793af0c75fa45b8bb4a68 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 00:29:27 +0900 Subject: [PATCH 16/46] =?UTF-8?q?feat:=20=EB=82=B4=EA=B0=80=20=EC=B0=B8?= =?UTF-8?q?=EC=97=AC=ED=95=9C=20=EC=B1=8C=EB=A6=B0=EC=A7=80=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20API=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/challenge.ts | 21 +++++++++++++++++++++ apis/hooks/challenge.ts | 13 +++++++++++++ pages/login.tsx | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 apis/challenge.ts create mode 100644 apis/hooks/challenge.ts diff --git a/apis/challenge.ts b/apis/challenge.ts new file mode 100644 index 0000000..4eea8ac --- /dev/null +++ b/apis/challenge.ts @@ -0,0 +1,21 @@ +import client, { ResponseBody } from "./client"; + +interface GetMyChallengeListResponse extends ResponseBody { + result: Challenge[]; +} + +export interface Challenge { + challengeIdx: number; + name: string; + participantsNum: number; + location: string; + schedule: string; + attendanceRate: number; + totalAttendanceRate: number; +} +async function getMyChallengeList(): Promise { + const { data } = await client.get(`/challenges`); + return data; +} + +export { getMyChallengeList }; diff --git a/apis/hooks/challenge.ts b/apis/hooks/challenge.ts new file mode 100644 index 0000000..0ab0369 --- /dev/null +++ b/apis/hooks/challenge.ts @@ -0,0 +1,13 @@ +import { getMyChallengeList } from "../challenge"; +import { useQuery } from "@tanstack/react-query"; + +function useGetMyChallengeList() { + const { data } = useQuery({ + queryKey: ["getMyChallengeList"], + queryFn: getMyChallengeList, + }); + + return { data }; +} + +export { useGetMyChallengeList }; diff --git a/pages/login.tsx b/pages/login.tsx index a8c3474..9deb870 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -50,7 +50,7 @@ const Login: NextPage = () => { const accessToken = data.result.accessToken; const refreshToken = data.result.refreshToken; console.log("accessToken:", accessToken); - // setTokenFromLocalStorage(accessToken); + setTokenFromLocalStorage(accessToken); router.push("/"); alert("로그인에 성공하였습니다"); }, From 50622c55ec6253da2d2dafbce051c1c88f1a2a28 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 00:30:03 +0900 Subject: [PATCH 17/46] =?UTF-8?q?fix:=20=ED=94=84=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EB=9E=A8=20=EC=B0=B8=EC=97=AC=20=EB=B2=84=ED=8A=BC=20=EC=B5=9C?= =?UTF-8?q?=EC=83=81=EB=8B=A8=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/home/challengeBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/home/challengeBox.tsx b/components/home/challengeBox.tsx index 3cf6604..a114f41 100644 --- a/components/home/challengeBox.tsx +++ b/components/home/challengeBox.tsx @@ -25,14 +25,14 @@ const HomeChallenge: NextPage = ({ onNotify }) => { {isAdmin ? "우리 센터에서 진행 중인 챌린지" : "참여 중인 챌린지"}
- -
router.push("/challenge/join")} > {isAdmin ? "새 프로그램 등록" : "참여 프로그램 추가"}
+ + Date: Tue, 25 Jun 2024 00:33:16 +0900 Subject: [PATCH 18/46] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20=EB=B8=8C?= =?UTF-8?q?=EB=9E=9C=EC=B9=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/nextjs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 80b099f..57b7d09 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -9,7 +9,7 @@ on: push: branches: ["deploy"] pull_request: - branches: ["deploy"] + branches: ["deploy", "main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From d2b88c3bf86b4552304349bfdaa13ff2787f62fc Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 01:33:44 +0900 Subject: [PATCH 19/46] =?UTF-8?q?feat:=20/users/myPage=20API=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 뱃지는 아직 하드코딩되어 있음 --- apis/hooks/mypage.ts | 13 ++++++ apis/mypage.ts | 17 ++++++++ components/mypage/profile.tsx | 9 +++- pages/mypage/index.tsx | 79 +++++++++++++++++++++-------------- 4 files changed, 84 insertions(+), 34 deletions(-) create mode 100644 apis/hooks/mypage.ts create mode 100644 apis/mypage.ts diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts new file mode 100644 index 0000000..79f976f --- /dev/null +++ b/apis/hooks/mypage.ts @@ -0,0 +1,13 @@ +import { useQuery } from "@tanstack/react-query"; +import { getMyInfo } from "../mypage"; + +function useGetMyInfo() { + const { data } = useQuery({ + queryKey: ["getMyInfo"], + queryFn: getMyInfo, + }); + + return { data }; +} + +export { useGetMyInfo }; diff --git a/apis/mypage.ts b/apis/mypage.ts new file mode 100644 index 0000000..ae74c32 --- /dev/null +++ b/apis/mypage.ts @@ -0,0 +1,17 @@ +import client, { ResponseBody } from "./client"; + +interface GetMyInfoResponse extends ResponseBody { + result: { + nickname: string; + level: number; + loginId: string; + isAdmin: boolean; + }; +} + +async function getMyInfo(): Promise { + const { data } = await client.get(`/users/myPage`); + return data; +} + +export { getMyInfo }; diff --git a/components/mypage/profile.tsx b/components/mypage/profile.tsx index 432c3b8..c45001d 100644 --- a/components/mypage/profile.tsx +++ b/components/mypage/profile.tsx @@ -2,7 +2,12 @@ import Image from "next/image"; import FlexBox from "../Flexbox"; import { useRouter } from "next/router"; -export default function Profile() { +interface ProfileProps { + nickname: string; + level: number; +} + +export default function Profile({ nickname, level }: ProfileProps) { const router = useRouter(); return (
-
서울복지관 관리자
+
{nickname}
diff --git a/pages/mypage/index.tsx b/pages/mypage/index.tsx index 38b6f5b..4aa9da9 100644 --- a/pages/mypage/index.tsx +++ b/pages/mypage/index.tsx @@ -1,3 +1,4 @@ +import { useGetMyInfo } from "@/apis/hooks/mypage"; import Divider from "@/components/Divider"; import FlexBox from "@/components/Flexbox"; import HeadFunction from "@/components/HeadFunction"; @@ -5,48 +6,62 @@ import NavBar from "@/components/NavBar"; import Profile from "@/components/mypage/profile"; import { NextPage } from "next"; import { useRouter } from "next/router"; - -const infoList = [ - { - name: "일반설정", - path: "/mypage/setting", - }, - { - name: "관리자 인증", - path: "/mypage/admin", - }, - { - name: "개인정보 처리방침", - path: "/mypage/term", - }, - { - name: "서비스 이용약관", - path: "/mypage/service", - }, - { - name: "로그아웃", - path: "/", - }, -]; +import { ToastContainer, Zoom, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; const MyPage: NextPage = () => { const router = useRouter(); + const { data } = useGetMyInfo(); + + const notify = () => { + toast.info("이미 관리자 인증을 완료하셨습니다.", { + position: "bottom-center", + }); + }; + + const certifyAdmin = () => { + if (data.result.isAdmin) notify(); + else router.push("/mypage/admin"); + }; + return (
- + - {infoList.map((info) => ( -
router.push(info.path)} - > - {info.name} -
- ))} +
router.push("/mypage/setting")} + > + 일반 설정 +
+
+ 관리자 인증 +
+
router.push("/mypage/term")} + > + 개인정보 처리방침 +
+
router.push("/mypage/service")} + > + 서비스 이용약관 +
+
로그아웃
+
); }; From 3092734d8a4e5e12965c00b7e0264a1524a4c16e Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 01:44:32 +0900 Subject: [PATCH 20/46] =?UTF-8?q?feat:=20/users/myPage=20API=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/profile.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/mypage/profile.tsx b/pages/mypage/profile.tsx index 8791e8a..3440898 100644 --- a/pages/mypage/profile.tsx +++ b/pages/mypage/profile.tsx @@ -1,3 +1,4 @@ +import { useGetMyInfo } from "@/apis/hooks/mypage"; import Divider from "@/components/Divider"; import FlexBox from "@/components/Flexbox"; import HeadFunction from "@/components/HeadFunction"; @@ -6,6 +7,8 @@ import { useRouter } from "next/router"; const Profile: NextPage = () => { const router = useRouter(); + const { data } = useGetMyInfo(); + const navigateToPasswordChange = () => { router.push("/mypage/password"); }; @@ -18,11 +21,11 @@ const Profile: NextPage = () => {
닉네임
-
위케어 매니저
+
{data?.result.nickname}
-
이메일 주소
-
email@wecare.com
+
아이디
+
{data?.result.loginId}
@@ -30,9 +33,8 @@ const Profile: NextPage = () => { className="underline h5 text-gray-500 pt-4 pb-2" onClick={navigateToPasswordChange} > - 로그아웃 + 비밀번호 수정
-
비밀번호 수정
회원 탈퇴하기
From d3bfc0db645d9878c2ba1751635807f7321d2c28 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 01:58:34 +0900 Subject: [PATCH 21/46] =?UTF-8?q?feat:=20/users/logout=20patch=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 18 +++++++++++++++--- apis/mypage.ts | 12 +++++++++++- pages/mypage/index.tsx | 13 +++++++++++-- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 79f976f..211f1af 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -1,5 +1,6 @@ -import { useQuery } from "@tanstack/react-query"; -import { getMyInfo } from "../mypage"; +import { useQuery, useMutation } from "@tanstack/react-query"; +import { getMyInfo, patchLogout } from "../mypage"; +import { useRouter } from "next/router"; function useGetMyInfo() { const { data } = useQuery({ @@ -10,4 +11,15 @@ function useGetMyInfo() { return { data }; } -export { useGetMyInfo }; +function usePatchLogout() { + const router = useRouter(); + const { mutate } = useMutation({ + mutationKey: ["patchLogout"], + mutationFn: patchLogout, + onSuccess: () => router.push("/main"), + }); + + return { mutate }; +} + +export { useGetMyInfo, usePatchLogout }; diff --git a/apis/mypage.ts b/apis/mypage.ts index ae74c32..eeddc7b 100644 --- a/apis/mypage.ts +++ b/apis/mypage.ts @@ -9,9 +9,19 @@ interface GetMyInfoResponse extends ResponseBody { }; } +interface PatchLogoutResponse { + isSuccess: boolean; + message: string; +} + async function getMyInfo(): Promise { const { data } = await client.get(`/users/myPage`); return data; } -export { getMyInfo }; +async function patchLogout(): Promise { + const { data } = await client.patch(`/users/logout`); + return data; +} + +export { getMyInfo, patchLogout }; diff --git a/pages/mypage/index.tsx b/pages/mypage/index.tsx index 4aa9da9..4681a2e 100644 --- a/pages/mypage/index.tsx +++ b/pages/mypage/index.tsx @@ -1,4 +1,4 @@ -import { useGetMyInfo } from "@/apis/hooks/mypage"; +import { useGetMyInfo, usePatchLogout } from "@/apis/hooks/mypage"; import Divider from "@/components/Divider"; import FlexBox from "@/components/Flexbox"; import HeadFunction from "@/components/HeadFunction"; @@ -12,6 +12,7 @@ import "react-toastify/dist/ReactToastify.css"; const MyPage: NextPage = () => { const router = useRouter(); const { data } = useGetMyInfo(); + const { mutate } = usePatchLogout(); const notify = () => { toast.info("이미 관리자 인증을 완료하셨습니다.", { @@ -24,6 +25,12 @@ const MyPage: NextPage = () => { else router.push("/mypage/admin"); }; + const logout = () => { + mutate(); + localStorage.removeItem("access_token"); + router.push("/main"); + }; + return (
@@ -51,7 +58,9 @@ const MyPage: NextPage = () => { > 서비스 이용약관
-
로그아웃
+
+ 로그아웃 +
Date: Tue, 25 Jun 2024 02:19:16 +0900 Subject: [PATCH 22/46] =?UTF-8?q?feat:=20/users/editPassword=20patch=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 17 +++++++++++++++-- apis/mypage.ts | 14 +++++++++++--- pages/mypage/password/index.tsx | 8 +++++++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 211f1af..19b2353 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -1,5 +1,5 @@ import { useQuery, useMutation } from "@tanstack/react-query"; -import { getMyInfo, patchLogout } from "../mypage"; +import { getMyInfo, patchLogout, patchPasswordChange } from "../mypage"; import { useRouter } from "next/router"; function useGetMyInfo() { @@ -22,4 +22,17 @@ function usePatchLogout() { return { mutate }; } -export { useGetMyInfo, usePatchLogout }; +function usePatchPasswordChange() { + const router = useRouter(); + const { mutate } = useMutation({ + mutationKey: ["patchPasswordChange"], + mutationFn: (body: { password: string; newPassword: string }) => + patchPasswordChange(body), + onSuccess: () => router.push("/mypage/password/success"), + onError: () => router.push("/404"), + }); + + return { mutate }; +} + +export { useGetMyInfo, usePatchLogout, usePatchPasswordChange }; diff --git a/apis/mypage.ts b/apis/mypage.ts index eeddc7b..615fbb2 100644 --- a/apis/mypage.ts +++ b/apis/mypage.ts @@ -9,7 +9,7 @@ interface GetMyInfoResponse extends ResponseBody { }; } -interface PatchLogoutResponse { +interface PatchResponse { isSuccess: boolean; message: string; } @@ -19,9 +19,17 @@ async function getMyInfo(): Promise { return data; } -async function patchLogout(): Promise { +async function patchLogout(): Promise { const { data } = await client.patch(`/users/logout`); return data; } -export { getMyInfo, patchLogout }; +async function patchPasswordChange(body: { + password: string; + newPassword: string; +}): Promise { + const { data } = await client.patch(`/users/editPassword`, body); + return data; +} + +export { getMyInfo, patchLogout, patchPasswordChange }; diff --git a/pages/mypage/password/index.tsx b/pages/mypage/password/index.tsx index 67ba9cc..d1e9384 100644 --- a/pages/mypage/password/index.tsx +++ b/pages/mypage/password/index.tsx @@ -1,3 +1,4 @@ +import { usePatchPasswordChange } from "@/apis/hooks/mypage"; import FlexBox from "@/components/Flexbox"; import HeadFunction from "@/components/HeadFunction"; import TextInput from "@/components/Input"; @@ -12,6 +13,7 @@ export interface InputError { const Password: NextPage = () => { const router = useRouter(); + const { mutate } = usePatchPasswordChange(); const [password, setPassword] = useState(""); const [newPw, setNewPw] = useState(""); @@ -89,6 +91,10 @@ const Password: NextPage = () => { newPw2Error.status, ]); + const changePassword = () => { + mutate({ password, newPassword: newPw }); + }; + return (
@@ -121,7 +127,7 @@ const Password: NextPage = () => { ? "bg-gray-300 text-gray-500" : "bg-main-color text-white" } h3 text-center py-2`} - onClick={() => router.push("/mypage/password/success")} + onClick={changePassword} > 새 비밀번호 저장 From 78adbfb385955fe22a4e384fab76afdda41fcb48 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:15:52 +0900 Subject: [PATCH 23/46] =?UTF-8?q?fix:=20/users/logout=20=EC=84=B1=EA=B3=B5?= =?UTF-8?q?=EC=8B=9C=EC=97=90=EB=A7=8C=20=ED=86=A0=ED=81=B0=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 --- apis/hooks/mypage.ts | 9 +++++++++ pages/mypage/index.tsx | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 19b2353..0aaa1ea 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -16,6 +16,15 @@ function usePatchLogout() { const { mutate } = useMutation({ mutationKey: ["patchLogout"], mutationFn: patchLogout, + onSuccess: () => { + localStorage.removeItem("access_token"); + router.push("/main"); + }, + onError: () => router.push("/404"), + }); + + return { mutate }; +} onSuccess: () => router.push("/main"), }); diff --git a/pages/mypage/index.tsx b/pages/mypage/index.tsx index 4681a2e..63ee547 100644 --- a/pages/mypage/index.tsx +++ b/pages/mypage/index.tsx @@ -27,8 +27,6 @@ const MyPage: NextPage = () => { const logout = () => { mutate(); - localStorage.removeItem("access_token"); - router.push("/main"); }; return ( From ec050ee63b26324ee4165285faecb9a36e1a8e3e Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:16:59 +0900 Subject: [PATCH 24/46] =?UTF-8?q?feat:=20/users/signout=20patch=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 25 ++++++++++++++++++-- apis/mypage.ts | 17 +++++++++++++- pages/mypage/profile.tsx | 15 ++++++------ pages/mypage/quit.tsx | 49 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 pages/mypage/quit.tsx diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 0aaa1ea..5398938 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -1,6 +1,12 @@ import { useQuery, useMutation } from "@tanstack/react-query"; -import { getMyInfo, patchLogout, patchPasswordChange } from "../mypage"; +import { + getMyInfo, + patchLogout, + patchPasswordChange, + patchQuitAccount, +} from "../mypage"; import { useRouter } from "next/router"; +import { InputError } from "@/pages/mypage/password"; function useGetMyInfo() { const { data } = useQuery({ @@ -25,7 +31,17 @@ function usePatchLogout() { return { mutate }; } + +function usePatchQuitAccount( + setPwError: React.Dispatch>, +) { + const router = useRouter(); + const { mutate } = useMutation({ + mutationKey: ["patchQuitAccount"], + mutationFn: (password: string) => patchQuitAccount(password), onSuccess: () => router.push("/main"), + onError: () => + setPwError({ status: true, text: "비밀번호가 올바르지 않습니다." }), }); return { mutate }; @@ -44,4 +60,9 @@ function usePatchPasswordChange() { return { mutate }; } -export { useGetMyInfo, usePatchLogout, usePatchPasswordChange }; +export { + useGetMyInfo, + usePatchLogout, + usePatchQuitAccount, + usePatchPasswordChange, +}; diff --git a/apis/mypage.ts b/apis/mypage.ts index 615fbb2..93ccbe1 100644 --- a/apis/mypage.ts +++ b/apis/mypage.ts @@ -14,6 +14,14 @@ interface PatchResponse { message: string; } +interface QuitAccountResponseBody { + timestamp: string; + status: number; + error: string; + code: string; + message: string; +} + async function getMyInfo(): Promise { const { data } = await client.get(`/users/myPage`); return data; @@ -24,6 +32,13 @@ async function patchLogout(): Promise { return data; } +async function patchQuitAccount( + password: string, +): Promise { + const { data } = await client.patch(`/users/signout`, { password }); + return data; +} + async function patchPasswordChange(body: { password: string; newPassword: string; @@ -32,4 +47,4 @@ async function patchPasswordChange(body: { return data; } -export { getMyInfo, patchLogout, patchPasswordChange }; +export { getMyInfo, patchLogout, patchQuitAccount, patchPasswordChange }; diff --git a/pages/mypage/profile.tsx b/pages/mypage/profile.tsx index 3440898..f8edaeb 100644 --- a/pages/mypage/profile.tsx +++ b/pages/mypage/profile.tsx @@ -9,10 +9,6 @@ const Profile: NextPage = () => { const router = useRouter(); const { data } = useGetMyInfo(); - const navigateToPasswordChange = () => { - router.push("/mypage/password"); - }; - return ( @@ -31,11 +27,16 @@ const Profile: NextPage = () => {
router.push("/mypage/password")} + > + 비밀번호 변경 +
+
router.push("/mypage/quit")} > - 비밀번호 수정 + 회원 탈퇴하기
-
회원 탈퇴하기
); diff --git a/pages/mypage/quit.tsx b/pages/mypage/quit.tsx new file mode 100644 index 0000000..79d880b --- /dev/null +++ b/pages/mypage/quit.tsx @@ -0,0 +1,49 @@ +import HeadFunction from "@/components/HeadFunction"; +import TextInput from "@/components/Input"; +import { NextPage } from "next"; +import { useState } from "react"; +import { InputError } from "./password"; +import Button from "@/components/Button"; +import FlexBox from "@/components/Flexbox"; +import { usePatchQuitAccount } from "@/apis/hooks/mypage"; + +const QuitAccount: NextPage = () => { + const [password, setPassword] = useState(""); + const [pwError, setPwError] = useState({ + status: false, + text: "비밀번호가 일치하지 않습니다.", + }); + + const { mutate } = usePatchQuitAccount(setPwError); + + const onClickQuitBtn = () => { + mutate(password); + }; + + return ( +
+ + + +
+ ); +}; + +export default QuitAccount; From 0f2e892102ebbeb3b1f0934be080890d02e309a3 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:17:19 +0900 Subject: [PATCH 25/46] =?UTF-8?q?fix:=20=EB=B9=84=EB=B0=80=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EB=B3=80=EA=B2=BD=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?Button=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/password/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/mypage/password/index.tsx b/pages/mypage/password/index.tsx index d1e9384..d41df57 100644 --- a/pages/mypage/password/index.tsx +++ b/pages/mypage/password/index.tsx @@ -1,4 +1,5 @@ import { usePatchPasswordChange } from "@/apis/hooks/mypage"; +import Button from "@/components/Button"; import FlexBox from "@/components/Flexbox"; import HeadFunction from "@/components/HeadFunction"; import TextInput from "@/components/Input"; @@ -120,17 +121,16 @@ const Password: NextPage = () => { isError={newPw2Error.status} errorText={newPw2Error.text} /> - + text="새 비밀번호 저장" + />
); From c55dbdff301133c346c8d7b332e64798ee059ee1 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:19:25 +0900 Subject: [PATCH 26/46] =?UTF-8?q?fix:=20=EB=B9=84=EB=B0=80=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EC=9E=85=EB=A0=A5=EC=B0=BD=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=EC=8B=9C=20=EC=97=90=EB=9F=AC=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EB=AF=B8=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/quit.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/mypage/quit.tsx b/pages/mypage/quit.tsx index 79d880b..2c1cb72 100644 --- a/pages/mypage/quit.tsx +++ b/pages/mypage/quit.tsx @@ -1,7 +1,7 @@ import HeadFunction from "@/components/HeadFunction"; import TextInput from "@/components/Input"; import { NextPage } from "next"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { InputError } from "./password"; import Button from "@/components/Button"; import FlexBox from "@/components/Flexbox"; @@ -11,7 +11,7 @@ const QuitAccount: NextPage = () => { const [password, setPassword] = useState(""); const [pwError, setPwError] = useState({ status: false, - text: "비밀번호가 일치하지 않습니다.", + text: "", }); const { mutate } = usePatchQuitAccount(setPwError); @@ -20,6 +20,14 @@ const QuitAccount: NextPage = () => { mutate(password); }; + useEffect(() => { + password.length === 0 && + setPwError({ + status: false, + text: "", + }); + }, [password]); + return (
From e62e4d6b5441a0fc534b35bde59aaf4e41b418a8 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:24:38 +0900 Subject: [PATCH 27/46] =?UTF-8?q?fix:=20Next/Image=20=EB=8C=80=EC=8B=A0=20?= =?UTF-8?q?=EC=A7=81=EC=A0=91=20Import=20=ED=95=B4=EC=84=9C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HeadFunction.tsx | 3 ++- components/mypage/profile.tsx | 3 ++- public/svgs/badges/3.svg | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/HeadFunction.tsx b/components/HeadFunction.tsx index 269cff2..30c5a3f 100644 --- a/components/HeadFunction.tsx +++ b/components/HeadFunction.tsx @@ -2,6 +2,7 @@ import { useRouter } from "next/router"; import FlexBox from "./Flexbox"; import Image from "next/image"; import Head from "next/head"; +import LeftArrowIcon from "@/public/svgs/LeftArrow.svg"; interface Props { leftIcon?: boolean; @@ -26,7 +27,7 @@ export default function HeadFunction({ className="w-5 h-5 shrink-0 items-center align-center" onClick={router.back} > - +
{title}
diff --git a/components/mypage/profile.tsx b/components/mypage/profile.tsx index c45001d..b5dcf5a 100644 --- a/components/mypage/profile.tsx +++ b/components/mypage/profile.tsx @@ -1,6 +1,7 @@ import Image from "next/image"; import FlexBox from "../Flexbox"; import { useRouter } from "next/router"; +import RightArrowIcon from "@/public/svgs/RightArrow.svg"; interface ProfileProps { nickname: string; @@ -19,7 +20,7 @@ export default function Profile({ nickname, level }: ProfileProps) {
{nickname}
- + ); } diff --git a/public/svgs/badges/3.svg b/public/svgs/badges/3.svg index 1fc30ee..58ad7ad 100644 --- a/public/svgs/badges/3.svg +++ b/public/svgs/badges/3.svg @@ -1,6 +1,6 @@ - + From e844d723c0b3c7a05916b7cb4b583f5ff8b8d371 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Wed, 26 Jun 2024 15:14:54 +0900 Subject: [PATCH 28/46] =?UTF-8?q?#16=20feat:=20calendar=ED=83=AD=20api=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/auth.tsx | 2 +- apis/calendar.ts | 27 ++++++++++++ apis/hooks/calendar.ts | 14 +++++++ components/NavBar.tsx | 2 +- components/calendar/InfoCalendar.tsx | 63 ++++++++++++++++++++++++++++ pages/calendar.tsx | 2 + pages/login.tsx | 2 +- public/svgs/Dot.svg | 5 +++ 8 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 apis/calendar.ts create mode 100644 apis/hooks/calendar.ts create mode 100644 public/svgs/Dot.svg diff --git a/apis/auth.tsx b/apis/auth.tsx index a8f5757..d88d664 100644 --- a/apis/auth.tsx +++ b/apis/auth.tsx @@ -20,7 +20,7 @@ export const SignIn = async (userData: { return response.data; } catch (error) { if (error.response) { - //200 이 외 + // 200 이외 console.error("서버 응답 오류:", error.response.data); } else if (error.request) { // 요청이 전송되었으나 응답을 받지 못한 경우 diff --git a/apis/calendar.ts b/apis/calendar.ts new file mode 100644 index 0000000..fb0325b --- /dev/null +++ b/apis/calendar.ts @@ -0,0 +1,27 @@ +import client, { ResponseBody } from "./client"; + +interface GetMonthCalendarResponse extends ResponseBody { + result: MonthCalendarProps[]; +} + +export interface MonthCalendarProps { + programIdx: number; + name: string; + openDate: { + year: number; + month: number; + day: number; + }; + dueDate: { + year: number; + month: number; + day: number; + }; +} + +// 챌린지 월별 조회 +export const getMonthCalendar = async (): Promise => { + const response = await client.get("/programs", {}); + // console.log("calenderData", response.data.result); + return response.data.result; +}; diff --git a/apis/hooks/calendar.ts b/apis/hooks/calendar.ts new file mode 100644 index 0000000..d994897 --- /dev/null +++ b/apis/hooks/calendar.ts @@ -0,0 +1,14 @@ +import { useQuery } from "@tanstack/react-query"; +import { getMonthCalendar } from "../calendar"; + +const useGetMonthCalendar = () => { + const { data } = useQuery({ + queryKey: ["getMonthCalendar"], + queryFn: getMonthCalendar, + }); + // console.log("isLoading", isLoading); + console.log("Query Data", data); + return { data }; +}; + +export { useGetMonthCalendar }; diff --git a/components/NavBar.tsx b/components/NavBar.tsx index ed7d0c8..28176bd 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -19,7 +19,7 @@ const NavBar = () => { return (
(new Date()); + // const [monthCalendarData, setMonthCalendarData] = useState< + // MonthCalendarProps[] + // >([]); + const onChangeToday = () => { setClickedDate(clickedDate); }; + const { data } = useGetMonthCalendar(); + + const customTileContent = ({ date, view }: { date: Date; view: string }) => { + let isOpen = true; + if (data && view === "month") { + const dayData = data.find((dayData: MonthCalendarProps) => { + const openDate = new Date( + dayData.openDate.year, + dayData.openDate.month - 1, + dayData.openDate.day, + ); + + const dueDate = new Date( + dayData.dueDate.year, + dayData.dueDate.month - 1, + dayData.dueDate.day, + ); + + if (date.getTime() === openDate.getTime()) isOpen = true; + else isOpen = false; + + return ( + date.getTime() === openDate.getTime() || + date.getTime() === dueDate.getTime() + ); + }); + + if (dayData) { + return ( +
+
+ + {dayData.name} +
+
+ ); + } + } + return null; + }; + return (
@@ -24,6 +72,7 @@ export default function InfoCalendar() { prev2Label={null} minDate={new Date(2024, 4, 1)} formatDay={(locale, date) => moment(date).format("DD")} + tileContent={customTileContent} />
@@ -42,6 +91,20 @@ const StyledCalendarWrapper = styled.div` padding: 0; } + .custom-tile-content { + /* position: absolute; */ + display: flex; + justify-content: center; + align-items: center; + z-index: 1; + } + + .custom-tile-text { + text-align: start; + line-height: 130%; + flex-wrap: wrap; + } + /* 년도, 월 */ .react-calendar__navigation { display: flex; diff --git a/pages/calendar.tsx b/pages/calendar.tsx index eab1a6d..303a9bb 100644 --- a/pages/calendar.tsx +++ b/pages/calendar.tsx @@ -7,6 +7,8 @@ import InfoCalendar from "@/components/calendar/InfoCalendar"; import { NextPage } from "next"; const CalendarPage: NextPage = () => { + const date = new Date(); + console.log(date); return (
diff --git a/pages/login.tsx b/pages/login.tsx index 9deb870..779cd6d 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -44,12 +44,12 @@ const Login: NextPage = () => { ); const signInMutation = useMutation({ + queryKey: ["SignIn"], mutationFn: SignIn, onSuccess: async (data) => { console.log(data); const accessToken = data.result.accessToken; const refreshToken = data.result.refreshToken; - console.log("accessToken:", accessToken); setTokenFromLocalStorage(accessToken); router.push("/"); alert("로그인에 성공하였습니다"); diff --git a/public/svgs/Dot.svg b/public/svgs/Dot.svg new file mode 100644 index 0000000..3780dcd --- /dev/null +++ b/public/svgs/Dot.svg @@ -0,0 +1,5 @@ + + + + + From e4ffbd0c5106db06551c9d70ad030a63b005f4e4 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 01:39:56 +0900 Subject: [PATCH 29/46] =?UTF-8?q?feat:=20/users/nickname=20post=20API=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 19 +++++++ apis/mypage.ts | 15 ++++- components/mypage/NicknameInput.tsx | 52 +++++++++++++++++ pages/mypage/nickname/index.tsx | 87 +++++++++++++++++++++++++++++ pages/mypage/profile.tsx | 6 ++ 5 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 components/mypage/NicknameInput.tsx create mode 100644 pages/mypage/nickname/index.tsx diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 5398938..ca49603 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -4,6 +4,7 @@ import { patchLogout, patchPasswordChange, patchQuitAccount, + postNicknameCheck, } from "../mypage"; import { useRouter } from "next/router"; import { InputError } from "@/pages/mypage/password"; @@ -60,9 +61,27 @@ function usePatchPasswordChange() { return { mutate }; } +function usePostNicknameCheck( + nickname: string, + setNameError: React.Dispatch>, +) { + const router = useRouter(); + const { mutate } = useMutation({ + mutationKey: ["postNicknameCheck", nickname], + mutationFn: () => postNicknameCheck(nickname), + onSuccess: () => setNameError({ status: false, text: "" }), + onError: () => { + setNameError({ status: true, text: "이미 사용 중인 닉네임입니다." }); + }, + }); + + return { mutate }; +} + export { useGetMyInfo, usePatchLogout, usePatchQuitAccount, usePatchPasswordChange, + usePostNicknameCheck, }; diff --git a/apis/mypage.ts b/apis/mypage.ts index 93ccbe1..c6fd5e6 100644 --- a/apis/mypage.ts +++ b/apis/mypage.ts @@ -47,4 +47,17 @@ async function patchPasswordChange(body: { return data; } -export { getMyInfo, patchLogout, patchQuitAccount, patchPasswordChange }; +async function postNicknameCheck( + nickname: string, +): Promise { + const { data } = await client.post(`/users/nickname`, { nickname }); + return data; +} + +export { + getMyInfo, + patchLogout, + patchQuitAccount, + patchPasswordChange, + postNicknameCheck, +}; diff --git a/components/mypage/NicknameInput.tsx b/components/mypage/NicknameInput.tsx new file mode 100644 index 0000000..a3ef322 --- /dev/null +++ b/components/mypage/NicknameInput.tsx @@ -0,0 +1,52 @@ +import { ChangeEvent, HTMLInputTypeAttribute, useState } from "react"; + +export interface TextInputProps { + value: string; + setValue: React.Dispatch>; + isError: boolean; + errorText?: string; + isSuccess: boolean; + placeholder?: string; +} + +export default function NicknameInput({ + value, + setValue, + isError, + errorText, + isSuccess, + placeholder = "", +}: TextInputProps) { + const onChangeText = (e: ChangeEvent) => { + setValue(e.target.value); + }; + + const borderStyle = () => { + if (isSuccess) return "border-green-600"; + else if (isError) return "border-red-500"; + return "border-transparent"; + }; + + return ( +
+
+ onChangeText(event)} + placeholder={placeholder} + /> +
+ {!isSuccess && isError && ( +
{errorText}
+ )} + {isSuccess && ( +
+ 사용 가능한 닉네임입니다. +
+ )} +
+ ); +} diff --git a/pages/mypage/nickname/index.tsx b/pages/mypage/nickname/index.tsx new file mode 100644 index 0000000..be1349b --- /dev/null +++ b/pages/mypage/nickname/index.tsx @@ -0,0 +1,87 @@ +import FlexBox from "@/components/Flexbox"; +import HeadFunction from "@/components/HeadFunction"; +import TextInput from "@/components/Input"; +import { NextPage } from "next"; +import { useState } from "react"; +import { InputError } from "../password"; +import { usePostNicknameCheck } from "@/apis/hooks/mypage"; +import Button from "@/components/Button"; +import NicknameInput from "@/components/mypage/NicknameInput"; + +const ChangeNickName: NextPage = () => { + const [newName, setNewname] = useState(""); + const [tempName, setTempName] = useState(""); // onClickChangeBtn를 가장 마지막 실행했을 때의 닉네임 + const [nameError, setNameError] = useState({ + status: false, + text: "", + }); + + const { mutate } = usePostNicknameCheck(newName, setNameError); + + const checkNicknameValidity = () => { + setTempName(newName); + if (newName.length > 8) { + setNameError({ + status: true, + text: "닉네임 최대 길이는 8자입니다.", + }); + return false; + } + + const regex = /^[가-힣a-zA-Z0-9\s]*$/; + if (!regex.test(newName)) { + setNameError({ + status: true, + text: "닉네임은 영어, 한글, 숫자로만 구성할 수 있습니다.", + }); + return false; + } + + return true; + }; + + const onClickChangeBtn = () => { + if (checkNicknameValidity()) mutate(); + }; + + return ( +
+ +
+
새 닉네임
+ + + + +
+
+ ); +}; + +export default ChangeNickName; diff --git a/pages/mypage/profile.tsx b/pages/mypage/profile.tsx index f8edaeb..f0f72cf 100644 --- a/pages/mypage/profile.tsx +++ b/pages/mypage/profile.tsx @@ -28,6 +28,12 @@ const Profile: NextPage = () => {
router.push("/mypage/password")} + > + 닉네임 변경 +
+
router.push("/mypage/password")} > 비밀번호 변경
From 3aec285c13a06ff688336adb5735041cab91ae9f Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 01:46:41 +0900 Subject: [PATCH 30/46] =?UTF-8?q?feat:=20/users/editNickname=20post=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 15 ++++++++++- apis/mypage.ts | 8 ++++++ pages/mypage/nickname/index.tsx | 23 +++++++++++----- pages/mypage/nickname/success.tsx | 44 +++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 7 deletions(-) create mode 100644 pages/mypage/nickname/success.tsx diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index ca49603..558d499 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -2,6 +2,7 @@ import { useQuery, useMutation } from "@tanstack/react-query"; import { getMyInfo, patchLogout, + patchNicknameChange, patchPasswordChange, patchQuitAccount, postNicknameCheck, @@ -61,11 +62,22 @@ function usePatchPasswordChange() { return { mutate }; } +function usePatchNicknameChange(nickname: string) { + const router = useRouter(); + const { mutate } = useMutation({ + mutationKey: ["postNicknameCheck", nickname], + mutationFn: () => patchNicknameChange(nickname), + onSuccess: () => router.push("/mypage/nickname/success"), + onError: () => router.push("/404"), + }); + + return { mutate }; +} + function usePostNicknameCheck( nickname: string, setNameError: React.Dispatch>, ) { - const router = useRouter(); const { mutate } = useMutation({ mutationKey: ["postNicknameCheck", nickname], mutationFn: () => postNicknameCheck(nickname), @@ -83,5 +95,6 @@ export { usePatchLogout, usePatchQuitAccount, usePatchPasswordChange, + usePatchNicknameChange, usePostNicknameCheck, }; diff --git a/apis/mypage.ts b/apis/mypage.ts index c6fd5e6..c8bb74e 100644 --- a/apis/mypage.ts +++ b/apis/mypage.ts @@ -47,6 +47,13 @@ async function patchPasswordChange(body: { return data; } +async function patchNicknameChange( + nickname: string, +): Promise { + const { data } = await client.patch(`/users/editNickname`, { nickname }); + return data; +} + async function postNicknameCheck( nickname: string, ): Promise { @@ -59,5 +66,6 @@ export { patchLogout, patchQuitAccount, patchPasswordChange, + patchNicknameChange, postNicknameCheck, }; diff --git a/pages/mypage/nickname/index.tsx b/pages/mypage/nickname/index.tsx index be1349b..774d1ee 100644 --- a/pages/mypage/nickname/index.tsx +++ b/pages/mypage/nickname/index.tsx @@ -4,19 +4,26 @@ import TextInput from "@/components/Input"; import { NextPage } from "next"; import { useState } from "react"; import { InputError } from "../password"; -import { usePostNicknameCheck } from "@/apis/hooks/mypage"; +import { + usePatchNicknameChange, + usePostNicknameCheck, +} from "@/apis/hooks/mypage"; import Button from "@/components/Button"; import NicknameInput from "@/components/mypage/NicknameInput"; const ChangeNickName: NextPage = () => { const [newName, setNewname] = useState(""); - const [tempName, setTempName] = useState(""); // onClickChangeBtn를 가장 마지막 실행했을 때의 닉네임 + const [tempName, setTempName] = useState(""); // onClickCheckBtn를 가장 마지막 실행했을 때의 닉네임 const [nameError, setNameError] = useState({ status: false, text: "", }); - const { mutate } = usePostNicknameCheck(newName, setNameError); + const { mutate: nameCheckMutate } = usePostNicknameCheck( + newName, + setNameError, + ); + const { mutate: nameChangeMutate } = usePatchNicknameChange(newName); const checkNicknameValidity = () => { setTempName(newName); @@ -40,8 +47,12 @@ const ChangeNickName: NextPage = () => { return true; }; + const onClickCheckBtn = () => { + if (checkNicknameValidity()) nameCheckMutate(); + }; + const onClickChangeBtn = () => { - if (checkNicknameValidity()) mutate(); + nameChangeMutate(); }; return ( @@ -66,14 +77,14 @@ const ChangeNickName: NextPage = () => { />
+ + ); +}; + +export default NicknameChangeSuccess; From 79db52b16434fce32ee2de4bda03a34f80850908 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:01:56 +0900 Subject: [PATCH 31/46] =?UTF-8?q?fix:=20navbar=20absolute=20>=20fixed?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/NavBar.tsx | 70 +++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/components/NavBar.tsx b/components/NavBar.tsx index ed7d0c8..5131c48 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -4,6 +4,7 @@ import MypageIcon from "@/public/svgs/MypageIcon.svg"; import { useRouter } from "next/router"; import NavBarItem from "./NavBarItem"; import { useEffect } from "react"; +import FlexBox from "./Flexbox"; const NavBar = () => { const router = useRouter(); @@ -18,40 +19,43 @@ const NavBar = () => { }, []); return ( -
-
- handleNavigate("/")} - iconType="home" - > - - - handleNavigate("/calendar")} - iconType="calendar" - > - - - handleNavigate("/mypage")} - iconType="mypage" - > - - + <> +
+
+ + handleNavigate("/")} + iconType="home" + > + + + handleNavigate("/calendar")} + iconType="calendar" + > + + + handleNavigate("/mypage")} + iconType="mypage" + > + + +
-
+ ); }; From ffe0c1e5b1c453a49c95fd57feb16a3ec5eaa775 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:10:01 +0900 Subject: [PATCH 32/46] =?UTF-8?q?fix:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20typo=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 --- pages/mypage/admin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mypage/admin.tsx b/pages/mypage/admin.tsx index e5d23ff..4e11798 100644 --- a/pages/mypage/admin.tsx +++ b/pages/mypage/admin.tsx @@ -10,7 +10,7 @@ const CertifyAdmin: NextPage = () => {
wecare@gmail.com - 으로 괸련 서류를 보내주시면 + 으로 관련 서류를 보내주시면
2-3일 내에 인증이 완료됩니다.
From 4632e0ca1fa7dccb175f084cc11f8d2df5a84794 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:10:15 +0900 Subject: [PATCH 33/46] =?UTF-8?q?fix:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EC=95=88=20=EB=90=98=EA=B2=8C=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 --- pages/mypage/admin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mypage/admin.tsx b/pages/mypage/admin.tsx index 4e11798..c417d37 100644 --- a/pages/mypage/admin.tsx +++ b/pages/mypage/admin.tsx @@ -7,7 +7,7 @@ const CertifyAdmin: NextPage = () => { return (
- +
wecare@gmail.com 으로 관련 서류를 보내주시면 From 6fb626ce335697875e468647b0e6e2a764bb4a6e Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:10:30 +0900 Subject: [PATCH 34/46] =?UTF-8?q?fix:=20=EB=8B=89=EB=84=A4=EC=9E=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=9D=BC?= =?UTF-8?q?=EC=9A=B0=ED=8C=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/profile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mypage/profile.tsx b/pages/mypage/profile.tsx index f0f72cf..9631acd 100644 --- a/pages/mypage/profile.tsx +++ b/pages/mypage/profile.tsx @@ -27,7 +27,7 @@ const Profile: NextPage = () => {
router.push("/mypage/password")} + onClick={() => router.push("/mypage/nickname")} > 닉네임 변경
From 9c57b136104bdca601b558e5168c5d80c5de71ca Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:15:39 +0900 Subject: [PATCH 35/46] =?UTF-8?q?fix:=20Headfunction=20=ED=99=94=EC=82=B4?= =?UTF-8?q?=ED=91=9C=20=EC=9E=98=EB=A6=AC=EB=8A=94=20=ED=98=84=EC=83=81=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/svgs/LeftArrow.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/svgs/LeftArrow.svg b/public/svgs/LeftArrow.svg index d12bc3d..6be9dbb 100644 --- a/public/svgs/LeftArrow.svg +++ b/public/svgs/LeftArrow.svg @@ -1,3 +1,3 @@ - + From c3ad3f745beb4c2de36587417f12247e21442787 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:15:59 +0900 Subject: [PATCH 36/46] =?UTF-8?q?fix:=20=EC=82=AC=EC=9A=A9=EC=9E=90=20?= =?UTF-8?q?=EB=A0=88=EB=B2=A8=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=B1=83?= =?UTF-8?q?=EC=A7=80=20=EB=8B=A4=EB=A5=B4=EA=B2=8C=20=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mypage/profile.tsx | 32 +++++++++++++++++++++++++++++++- public/svgs/badges/1.svg | 3 +++ public/svgs/badges/2.svg | 3 +++ public/svgs/badges/3.svg | 6 +++--- public/svgs/badges/4.svg | 3 +++ public/svgs/badges/5.svg | 3 +++ public/svgs/badges/6.svg | 3 +++ 7 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 public/svgs/badges/1.svg create mode 100644 public/svgs/badges/2.svg create mode 100644 public/svgs/badges/4.svg create mode 100644 public/svgs/badges/5.svg create mode 100644 public/svgs/badges/6.svg diff --git a/components/mypage/profile.tsx b/components/mypage/profile.tsx index b5dcf5a..9b1a25f 100644 --- a/components/mypage/profile.tsx +++ b/components/mypage/profile.tsx @@ -2,6 +2,12 @@ import Image from "next/image"; import FlexBox from "../Flexbox"; import { useRouter } from "next/router"; import RightArrowIcon from "@/public/svgs/RightArrow.svg"; +import Level1Icon from "@/public/svgs/badges/1.svg"; +import Level2Icon from "@/public/svgs/badges/2.svg"; +import Level3Icon from "@/public/svgs/badges/3.svg"; +import Level4Icon from "@/public/svgs/badges/4.svg"; +import Level5Icon from "@/public/svgs/badges/5.svg"; +import Level6Icon from "@/public/svgs/badges/6.svg"; interface ProfileProps { nickname: string; @@ -10,6 +16,30 @@ interface ProfileProps { export default function Profile({ nickname, level }: ProfileProps) { const router = useRouter(); + + const returnBadge = () => { + switch (level) { + case 1: + return ; + break; + case 2: + return ; + break; + case 3: + return ; + break; + case 4: + return ; + break; + case 5: + return ; + break; + case 6: + default: + return ; + break; + } + }; return (
{nickname}
- + {returnBadge()} diff --git a/public/svgs/badges/1.svg b/public/svgs/badges/1.svg new file mode 100644 index 0000000..09c0c20 --- /dev/null +++ b/public/svgs/badges/1.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/badges/2.svg b/public/svgs/badges/2.svg new file mode 100644 index 0000000..532ac39 --- /dev/null +++ b/public/svgs/badges/2.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/badges/3.svg b/public/svgs/badges/3.svg index 58ad7ad..fa4c526 100644 --- a/public/svgs/badges/3.svg +++ b/public/svgs/badges/3.svg @@ -1,9 +1,9 @@ - - + + - + diff --git a/public/svgs/badges/4.svg b/public/svgs/badges/4.svg new file mode 100644 index 0000000..b79ced1 --- /dev/null +++ b/public/svgs/badges/4.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/badges/5.svg b/public/svgs/badges/5.svg new file mode 100644 index 0000000..4f86280 --- /dev/null +++ b/public/svgs/badges/5.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/badges/6.svg b/public/svgs/badges/6.svg new file mode 100644 index 0000000..7b1c33f --- /dev/null +++ b/public/svgs/badges/6.svg @@ -0,0 +1,3 @@ + + + From 6ca00cf8590c61a1723fb834e835bc64ff534e0a Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:22:02 +0900 Subject: [PATCH 37/46] =?UTF-8?q?chore:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=95=BD=EA=B4=80=20=EB=9D=BC=EC=9A=B0?= =?UTF-8?q?=ED=8C=85=20=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/mypage/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/mypage/index.tsx b/pages/mypage/index.tsx index 63ee547..299810a 100644 --- a/pages/mypage/index.tsx +++ b/pages/mypage/index.tsx @@ -46,13 +46,13 @@ const MyPage: NextPage = () => {
router.push("/mypage/term")} + // onClick={() => router.push("/mypage/term")} > 개인정보 처리방침
router.push("/mypage/service")} + // onClick={() => router.push("/mypage/service")} > 서비스 이용약관
From c8aa16985ba843c9d896efe90b5d2a83ed30794b Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 27 Jun 2024 02:22:22 +0900 Subject: [PATCH 38/46] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9B=90=20=ED=83=88?= =?UTF-8?q?=ED=87=B4=EC=8B=9C=20=ED=86=A0=ED=81=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/hooks/mypage.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/hooks/mypage.ts b/apis/hooks/mypage.ts index 558d499..43bee93 100644 --- a/apis/hooks/mypage.ts +++ b/apis/hooks/mypage.ts @@ -41,7 +41,10 @@ function usePatchQuitAccount( const { mutate } = useMutation({ mutationKey: ["patchQuitAccount"], mutationFn: (password: string) => patchQuitAccount(password), - onSuccess: () => router.push("/main"), + onSuccess: () => { + localStorage.removeItem("access_token"); + router.push("/main"); + }, onError: () => setPwError({ status: true, text: "비밀번호가 올바르지 않습니다." }), }); From 32531234f1eb3e20f2cee28722c55bcd92027ab0 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 10:05:22 +0900 Subject: [PATCH 39/46] =?UTF-8?q?#16=20style:=20=EC=BA=98=EB=A6=B0?= =?UTF-8?q?=EB=8D=94=20=EB=82=B4=EB=B6=80=20=EC=9D=BC=EC=A0=95=EC=9D=B4=20?= =?UTF-8?q?=EA=B8=B8=EC=96=B4=EC=A7=80=EB=A9=B4=20hidden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/InfoCalendar.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index 3993b8d..82a928f 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -50,9 +50,11 @@ export default function InfoCalendar() { if (dayData) { return (
-
+
- {dayData.name} +
+ {dayData.name} +
); From 74fca6aa07f05a3376b09ccd2a88ae3f9643658f Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 10:29:12 +0900 Subject: [PATCH 40/46] =?UTF-8?q?#16=20feat:=20modal=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/CalendarModal.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 components/calendar/CalendarModal.tsx diff --git a/components/calendar/CalendarModal.tsx b/components/calendar/CalendarModal.tsx new file mode 100644 index 0000000..2749982 --- /dev/null +++ b/components/calendar/CalendarModal.tsx @@ -0,0 +1,11 @@ +interface CalendarModalProps {} + +const CalendarModal = ({ filterName }) => { + return ( +
+
{filterName}
+
+ ); +}; + +export default CalendarModal; From ea419d6caf3b6485491b4e822de7eade4c485684 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 10:30:53 +0900 Subject: [PATCH 41/46] =?UTF-8?q?fix:=20NavBar=20jsx=20=EC=98=A4=EB=A5=98?= =?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 --- components/NavBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/NavBar.tsx b/components/NavBar.tsx index d7f5887..0b58248 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -52,7 +52,7 @@ const NavBar = () => {
- +
); }; From 172947f71081603b8ebb1f9e64a6744268073218 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 11:45:13 +0900 Subject: [PATCH 42/46] =?UTF-8?q?#16=20feat:=20calendar=20=EC=9B=94?= =?UTF-8?q?=EB=B3=84=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B0=B0=EC=97=B4=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 --- apis/calendar.ts | 28 ++++++++++++++++- apis/hooks/calendar.ts | 14 ++++++++- components/NavBar.tsx | 2 +- components/calendar/CalendarModal.tsx | 2 -- components/calendar/InfoCalendar.tsx | 43 +++++++++++++++++++-------- 5 files changed, 71 insertions(+), 18 deletions(-) diff --git a/apis/calendar.ts b/apis/calendar.ts index fb0325b..19d1183 100644 --- a/apis/calendar.ts +++ b/apis/calendar.ts @@ -19,9 +19,35 @@ export interface MonthCalendarProps { }; } +type CalendarDate = { + year: number; + month: number; + day: number; +}; + +interface GetProgramDetailBody { + programIdx: number; + name: string; + openDate: CalendarDate; + dueDate: CalendarDate; + location: string; + host: string; + schedule: string; + description: string; +} + // 챌린지 월별 조회 export const getMonthCalendar = async (): Promise => { - const response = await client.get("/programs", {}); + const response = await client.get("/programs"); // console.log("calenderData", response.data.result); return response.data.result; }; + +export const getProgramDetail = async ( + programIdx: number, +): Promise => { + // const response = await client.get(`/programs/${programIdx}`); + const response = await client.get(`/programs/2`); + // console.log("calenderDetail", response.data.result); + return response.data.result; +}; diff --git a/apis/hooks/calendar.ts b/apis/hooks/calendar.ts index d994897..e009859 100644 --- a/apis/hooks/calendar.ts +++ b/apis/hooks/calendar.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { getMonthCalendar } from "../calendar"; +import { getMonthCalendar, getProgramDetail } from "../calendar"; const useGetMonthCalendar = () => { const { data } = useQuery({ @@ -12,3 +12,15 @@ const useGetMonthCalendar = () => { }; export { useGetMonthCalendar }; + +const useGetProgramDetail = () => { + const { data } = useQuery({ + queryKey: ["getProgramDetail"], + queryFn: getProgramDetail, + }); + // console.log("isLoading", isLoading); + console.log("Query Data", data); + return { data }; +}; + +export { useGetProgramDetail }; diff --git a/components/NavBar.tsx b/components/NavBar.tsx index d7f5887..0b58248 100644 --- a/components/NavBar.tsx +++ b/components/NavBar.tsx @@ -52,7 +52,7 @@ const NavBar = () => {
- +
); }; diff --git a/components/calendar/CalendarModal.tsx b/components/calendar/CalendarModal.tsx index 2749982..4d22e7d 100644 --- a/components/calendar/CalendarModal.tsx +++ b/components/calendar/CalendarModal.tsx @@ -1,5 +1,3 @@ -interface CalendarModalProps {} - const CalendarModal = ({ filterName }) => { return (
diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index 82a928f..7e260a1 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -20,12 +20,16 @@ export default function InfoCalendar() { setClickedDate(clickedDate); }; + // API 관리 const { data } = useGetMonthCalendar(); + const handleDayDataClick = (programIdx: number) => { + console.log("API 호출: ", programIdx); + }; + const customTileContent = ({ date, view }: { date: Date; view: string }) => { - let isOpen = true; if (data && view === "month") { - const dayData = data.find((dayData: MonthCalendarProps) => { + const dayData = data.filter((dayData: MonthCalendarProps) => { const openDate = new Date( dayData.openDate.year, dayData.openDate.month - 1, @@ -38,24 +42,36 @@ export default function InfoCalendar() { dayData.dueDate.day, ); - if (date.getTime() === openDate.getTime()) isOpen = true; - else isOpen = false; - return ( date.getTime() === openDate.getTime() || date.getTime() === dueDate.getTime() ); }); - if (dayData) { + if (dayData.length > 0) { return (
-
- -
- {dayData.name} -
-
+ {dayData.map((day: MonthCalendarProps, index: number) => { + const isOpen = + date.getTime() === + new Date( + day.openDate.year, + day.openDate.month - 1, + day.openDate.day, + ).getTime(); + console.log(day); + return ( +
+ +
handleDayDataClick(day.programIdx)} + > + {day.name} +
+
+ ); + })}
); } @@ -96,9 +112,10 @@ const StyledCalendarWrapper = styled.div` .custom-tile-content { /* position: absolute; */ display: flex; + flex-direction: column; justify-content: center; - align-items: center; z-index: 1; + gap: 1px; } .custom-tile-text { From 31097ed016ab3e63ad6108826b0f2cbeec2dd87a Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 13:10:50 +0900 Subject: [PATCH 43/46] #16 fix : deploy error --- apis/hooks/calendar.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apis/hooks/calendar.ts b/apis/hooks/calendar.ts index e009859..d7b7ebe 100644 --- a/apis/hooks/calendar.ts +++ b/apis/hooks/calendar.ts @@ -13,14 +13,14 @@ const useGetMonthCalendar = () => { export { useGetMonthCalendar }; -const useGetProgramDetail = () => { - const { data } = useQuery({ - queryKey: ["getProgramDetail"], - queryFn: getProgramDetail, - }); - // console.log("isLoading", isLoading); - console.log("Query Data", data); - return { data }; -}; +// const useGetProgramDetail = () => { +// const { data } = useQuery({ +// queryKey: ["getProgramDetail"], +// queryFn: getProgramDetail, +// }); +// // console.log("isLoading", isLoading); +// console.log("Query Data", data); +// return { data }; +// }; -export { useGetProgramDetail }; +// export { useGetProgramDetail }; From cc5ed4b066272c416416aa52d446d0d928ee8cbd Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 13:15:09 +0900 Subject: [PATCH 44/46] #16 fix : eslint-plugin install --- package.json | 1 + yarn.lock | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cdad378..4fa7dec 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@yarnpkg/pnpify": "^4.1.0", "eslint": "8.54.0", "eslint-config-next": "14.0.3", + "eslint-plugin-react": "^7.34.3", "typescript": "5.4.5" }, "packageManager": "yarn@4.2.2" diff --git a/yarn.lock b/yarn.lock index f093ece..0bf0778 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4029,7 +4029,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.33.2": +"eslint-plugin-react@npm:^7.33.2, eslint-plugin-react@npm:^7.34.3": version: 7.34.3 resolution: "eslint-plugin-react@npm:7.34.3" dependencies: @@ -7677,6 +7677,7 @@ __metadata: embla-carousel-react: "npm:^8.1.3" eslint: "npm:8.54.0" eslint-config-next: "npm:14.0.3" + eslint-plugin-react: "npm:^7.34.3" gh-pages: "npm:^6.1.1" jotai: "npm:^2.8.3" lottie-web: "npm:^5.12.2" From c43e5925c8ba0db9f33d48dfbe82602ca197c079 Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 13:27:43 +0900 Subject: [PATCH 45/46] =?UTF-8?q?#16=20fix=20:=20data=20isArray=20?= =?UTF-8?q?=ED=83=80=EC=9E=85=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/InfoCalendar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/calendar/InfoCalendar.tsx b/components/calendar/InfoCalendar.tsx index 7e260a1..381d1c5 100644 --- a/components/calendar/InfoCalendar.tsx +++ b/components/calendar/InfoCalendar.tsx @@ -28,7 +28,7 @@ export default function InfoCalendar() { }; const customTileContent = ({ date, view }: { date: Date; view: string }) => { - if (data && view === "month") { + if (Array.isArray(data) && view === "month") { const dayData = data.filter((dayData: MonthCalendarProps) => { const openDate = new Date( dayData.openDate.year, From 22a665a49895b071d021c5fd2583138f33510ece Mon Sep 17 00:00:00 2001 From: leejin_rho Date: Thu, 27 Jun 2024 13:31:23 +0900 Subject: [PATCH 46/46] =?UTF-8?q?#16=20fix=20:=20useMutation=20muntationKe?= =?UTF-8?q?y=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/login.tsx b/pages/login.tsx index 779cd6d..6543f99 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -44,7 +44,7 @@ const Login: NextPage = () => { ); const signInMutation = useMutation({ - queryKey: ["SignIn"], + mutationKey: ["SignIn"], mutationFn: SignIn, onSuccess: async (data) => { console.log(data);