From abb6064a8cccb919e5770d4e49e5fd3b4785a0fc Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 15:49:03 +0900 Subject: [PATCH 01/17] =?UTF-8?q?:sparkles:=20feat:=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=97=94=ED=84=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/common/Input.tsx | 2 +- src/app/components/login/LoginContainer.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/components/common/Input.tsx b/src/app/components/common/Input.tsx index d87aa8fc..381f6707 100644 --- a/src/app/components/common/Input.tsx +++ b/src/app/components/common/Input.tsx @@ -50,7 +50,7 @@ const Input = ({ name={name} onFocus={onFocus} onBlur={onBlur} - onKeyPress={(e) => e.key === 'Enter' && onEnterPress && onEnterPress()} + onKeyDown={(e) => e.key === 'Enter' && onEnterPress && onEnterPress()} onChange={onChange} className={buttonStyles} accept={accept} diff --git a/src/app/components/login/LoginContainer.tsx b/src/app/components/login/LoginContainer.tsx index e3942da2..00d4fc0d 100644 --- a/src/app/components/login/LoginContainer.tsx +++ b/src/app/components/login/LoginContainer.tsx @@ -64,6 +64,7 @@ const LoginContainer = () => { type={'login'} onChange={(e) => setPw(e.target.value)} placeholder="비밀번호" + onEnterPress={postLogin} />
Date: Sat, 1 Jun 2024 15:51:04 +0900 Subject: [PATCH 02/17] =?UTF-8?q?:recycle:=20refactor:=20=EB=AF=B8?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/test/page.tsx | 306 ---------------------------------- 1 file changed, 306 deletions(-) delete mode 100644 src/app/(route)/test/page.tsx diff --git a/src/app/(route)/test/page.tsx b/src/app/(route)/test/page.tsx deleted file mode 100644 index 0ae4566f..00000000 --- a/src/app/(route)/test/page.tsx +++ /dev/null @@ -1,306 +0,0 @@ -'use client' -import JobAnal2 from '@/app/components/mypage/common/JobAnal2' -import { useModal } from '@/app/hooks/useModal' - -const page = () => { - const { isOpen, openModal, closeModal, handleModalClick } = useModal(false) - - return ( -
-
-
-
- - {'yng1404'}{' '} - - - 님과 {'BACKEND'}의 직무 적합도는 - - - {87}% - - - 입니다. - -
- -
- yng1404 - 님은 이런 역량이 두드러져요! -
-
- 👍 조금만 더 노력하면 분명 원하는 목표에 도달할 거예요! -
- -
-
- -
-
-
-
-
-
-
- - - - - - - - - - - - -
- {'키워드1'} -
-
-
-
-
- - - - - - - - - - - - -
- {'키워드2'} -
-
-
-
- - - - - - - - - - - - -
- {'키워드3'} -
-
-
-
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
-
- AI 자기소개서 직무 역량 분석 -
-
- -
-
-
- ) -} - -export default page From 12d2e5abdc5b9d1f8e945223f8e6e076bd680cb3 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 15:55:16 +0900 Subject: [PATCH 03/17] =?UTF-8?q?:sparkles:=20feat:=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20=EC=97=94=ED=84=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/signup/containers/SignupContainer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/components/signup/containers/SignupContainer.tsx b/src/app/components/signup/containers/SignupContainer.tsx index d008ce9c..0c339b5e 100644 --- a/src/app/components/signup/containers/SignupContainer.tsx +++ b/src/app/components/signup/containers/SignupContainer.tsx @@ -46,11 +46,12 @@ const SignupContainer = () => { `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/signup/auth`, requestOptions, ) - if (!res.ok) { + if (res.ok) { + router.push('/signup/onboard') + }else{ setAuthCode('') mismatchAlert() } - router.push('/signup/onboard') } return ( @@ -86,6 +87,7 @@ const SignupContainer = () => { onChange={(e) => setAuthCode(e.target.value)} placeholder="인증코드 입력하기" textValue={authCode} + onEnterPress={() =>authorizeCode(email, authCode)} />
From 54f464a9c0e80d096800588c0da7ef8e49d6e93f Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 16:19:19 +0900 Subject: [PATCH 04/17] =?UTF-8?q?:sparkles:=20feat:=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=ED=8C=90=20=EC=97=94=ED=84=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/board/Comment.tsx | 5 ++++- src/app/components/board/ReComment.tsx | 3 +++ src/app/components/board/SearchBoard.tsx | 1 + src/app/components/board/containers/CommentContainer.tsx | 4 ++-- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/components/board/Comment.tsx b/src/app/components/board/Comment.tsx index e4173a7e..d46ecf61 100644 --- a/src/app/components/board/Comment.tsx +++ b/src/app/components/board/Comment.tsx @@ -97,6 +97,9 @@ const Comment = ({ data, setReply, setCommentId }: CommentProps) => {
@@ -129,7 +132,7 @@ const Comment = ({ data, setReply, setCommentId }: CommentProps) => { alt="logoIcon" />
-
{data.memberName}
+
{data.memberName}
{timeCalculate(data.sinceCreation)}
{isAuthor && diff --git a/src/app/components/board/ReComment.tsx b/src/app/components/board/ReComment.tsx index 77fce0e0..d2ff437d 100644 --- a/src/app/components/board/ReComment.tsx +++ b/src/app/components/board/ReComment.tsx @@ -102,6 +102,9 @@ const ReComment = ({ className="w-[70%] h-[100%] p-3 text focus:outline-none overflow-y-auto scrollbar-hide" value={content} onChange={(e) => setContent(e.target.value)} + onKeyDown={(e) => + e.key === 'Enter' && updateComment && updateComment() + } >
- {data.title} + {data.title.length > 23 ? ( + <>{data.title.slice(0, 23)}... + ) : ( + data.title + )}
{data.content.length > 52 ? ( diff --git a/src/app/components/board/job/JobPost.tsx b/src/app/components/board/job/JobPost.tsx index 29ddd989..a7a7b7fb 100644 --- a/src/app/components/board/job/JobPost.tsx +++ b/src/app/components/board/job/JobPost.tsx @@ -2,10 +2,10 @@ import { PROFILE_EMOJI } from '@/app/constants/signup' import { selectedPostId } from '@/app/recoil/board' import { comment } from '@/app/ui/IconsPath' import Like from '@/app/ui/svg/main/Like' +import Image from 'next/image' import { useState } from 'react' import { useRecoilState } from 'recoil' import Icons from '../../common/Icons' -import Image from 'next/image' interface JobPostProps { data: BoardInfoTypes @@ -40,13 +40,18 @@ const JobPost = ({ data }: JobPostProps) => { {data.jobCategory}
- {data.title} + {data.title.length > 23 ? ( + <> + {data.title.slice(0, 23)}... + + ) : ( + data.title + )}
{data.content.length > 60 ? ( <> - {data.content.slice(0, 60)} - ... + {data.content.slice(0, 60)}... ) : ( data.content From 26f4200cb2edee0f55659739c74ad5cc657eead7 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 16:24:19 +0900 Subject: [PATCH 06/17] =?UTF-8?q?:sparkles:=20feat:=20=EA=B7=B8=EB=A3=B9?= =?UTF-8?q?=EC=9B=90=20=EB=AA=A8=EC=A7=91=20=EC=B4=88=EA=B8=B0=EC=97=90=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=EB=84=88=EC=8A=A4=20=EA=B8=88=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/board/containers/PostGroupContainer.tsx | 2 +- src/app/components/board/group/GroupPost.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/board/containers/PostGroupContainer.tsx b/src/app/components/board/containers/PostGroupContainer.tsx index d8c463c6..bc8ff1c3 100644 --- a/src/app/components/board/containers/PostGroupContainer.tsx +++ b/src/app/components/board/containers/PostGroupContainer.tsx @@ -22,7 +22,7 @@ const PostGroupContainer = ({ isEdit, data }: PostGroupContainerProps) => { useState(null) const [title, setTitle] = useState('') const [content, setContent] = useState('') - const [member, setMember] = useState('') + const [member, setMember] = useState('0') const contentment = title !== '' && content != '' && diff --git a/src/app/components/board/group/GroupPost.tsx b/src/app/components/board/group/GroupPost.tsx index fd033c8c..72a3f0c9 100644 --- a/src/app/components/board/group/GroupPost.tsx +++ b/src/app/components/board/group/GroupPost.tsx @@ -57,7 +57,7 @@ const GroupPost = ({ data }: GroupPostProps) => { {data.content.length > 52 ? ( <> {data.content.slice(0, 52)} - ... + ... ) : ( data.content From 495dc7b83b8af96ef50ce1f36f2c97bc0118ecb1 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 16:32:37 +0900 Subject: [PATCH 07/17] =?UTF-8?q?:sparkles:=20feat:=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=20=ED=97=A4=EB=8D=94=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=EA=B2=80=EC=83=89=20=EC=97=94=ED=84=B0=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/admin/board/SearchInput.tsx | 1 + src/app/components/admin/containers/AdminNavContainer.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/admin/board/SearchInput.tsx b/src/app/components/admin/board/SearchInput.tsx index ce4b7a19..30a20753 100644 --- a/src/app/components/admin/board/SearchInput.tsx +++ b/src/app/components/admin/board/SearchInput.tsx @@ -32,6 +32,7 @@ const SearchInput = ({ searchBoard, searchUser }: SearchInputProps) => { className="w-[200px]" type={'search'} onChange={(e) => setTitle(e.target.value)} + onEnterPress={() => getKeywordBoard(title)} />
getKeywordBoard(title)} /> diff --git a/src/app/components/admin/containers/AdminNavContainer.tsx b/src/app/components/admin/containers/AdminNavContainer.tsx index 7e9f1652..5d14007a 100644 --- a/src/app/components/admin/containers/AdminNavContainer.tsx +++ b/src/app/components/admin/containers/AdminNavContainer.tsx @@ -8,8 +8,8 @@ interface AdminNavContainerProps { const AdminNavContainer = ({ selected }: AdminNavContainerProps) => { return (
-
-
+
+
👨‍💻
관리자
From df150c32c677f9edfa1a13552d98fa0ce0d90067 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 16:47:19 +0900 Subject: [PATCH 08/17] =?UTF-8?q?:sparkles:=20feat:=20=ED=91=B8=ED=84=B0?= =?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 --- src/app/components/layout/Footer.tsx | 51 ++++++++++++++++------------ 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/app/components/layout/Footer.tsx b/src/app/components/layout/Footer.tsx index aa2e28c1..cdff5787 100644 --- a/src/app/components/layout/Footer.tsx +++ b/src/app/components/layout/Footer.tsx @@ -1,34 +1,35 @@ -'use client' - import Image from 'next/image' +import Link from 'next/link' const Footer = () => { return (
-
+
이용약관
개인정보처리방침
책임의 한계와 법적고지
회원정보 고객센터
-
- logoIcon -
MeetFolio
-
Copyright
-
©MeetFolio Corp.
-
All Rights Reserved
-
+ +
+ logoIcon +
MeetFolio
+
Copyright
+
©MeetFolio Corp.
+
All Rights Reserved
+
+
-
Contributors
+
Contributors
{ alt="github icon" />
-
-
Dana
-
Kylo
-
Nakdo
-
Minkyu
+
+ +
Dana
+ + +
Nakdo
+ + +
Kylo
+ + +
Minkyu
+
From fecb80974ea88d48af13bacf42df5c55ee02f49e Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 16:58:11 +0900 Subject: [PATCH 09/17] =?UTF-8?q?:recycle:=20refactor:=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=ED=81=B4=EB=9D=BC=EC=9D=B4=EC=96=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/page.tsx | 2 -- src/app/(route)/board/page.tsx | 7 ++----- src/app/(route)/signup/complete/page.tsx | 2 -- src/app/(route)/signup/page.tsx | 2 -- src/app/components/admin/containers/DashboardContainer.tsx | 1 + src/app/components/signup/Complete.tsx | 2 ++ src/app/components/signup/containers/SignupContainer.tsx | 4 ++-- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/app/(route)/admin/page.tsx b/src/app/(route)/admin/page.tsx index 183e7bfb..28058596 100644 --- a/src/app/(route)/admin/page.tsx +++ b/src/app/(route)/admin/page.tsx @@ -1,9 +1,7 @@ -'use client' import AdminNavContainer from '@/app/components/admin/containers/AdminNavContainer' import DashboardContainer from '@/app/components/admin/containers/DashboardContainer' import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' -import { useEffect, useState } from 'react' export default function AdminPage() { return ( diff --git a/src/app/(route)/board/page.tsx b/src/app/(route)/board/page.tsx index efadeb28..16f02c9a 100644 --- a/src/app/(route)/board/page.tsx +++ b/src/app/(route)/board/page.tsx @@ -3,13 +3,12 @@ import BoardContainer from '@/app/components/board/containers/BoardContainer' import BoardDetailContainer from '@/app/components/board/containers/BoardDetailContainer' import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' -import { boardDataState, selectedPostId } from '@/app/recoil/board' +import { selectedPostId } from '@/app/recoil/board' import { useEffect, useState } from 'react' -import { useRecoilState, useResetRecoilState } from 'recoil' +import { useResetRecoilState } from 'recoil' export default function JobBoardPage() { const [data, setData] = useState(null) - const [boardData, setBoardData] = useRecoilState(boardDataState) const resetId = useResetRecoilState(selectedPostId) useEffect(() => { @@ -19,8 +18,6 @@ export default function JobBoardPage() { `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/board/employment?page=0`, ) const resData = await response.json() - - setBoardData(resData.result) setData(resData.result) } fetchData() diff --git a/src/app/(route)/signup/complete/page.tsx b/src/app/(route)/signup/complete/page.tsx index 3885ceab..24c897a2 100644 --- a/src/app/(route)/signup/complete/page.tsx +++ b/src/app/(route)/signup/complete/page.tsx @@ -1,5 +1,3 @@ -'use client' - import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' import Completed from '@/app/components/signup/Complete' diff --git a/src/app/(route)/signup/page.tsx b/src/app/(route)/signup/page.tsx index 45a09f3c..9519d514 100644 --- a/src/app/(route)/signup/page.tsx +++ b/src/app/(route)/signup/page.tsx @@ -1,5 +1,3 @@ -'use client' - import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' import SignupContainer from '@/app/components/signup/containers/SignupContainer' diff --git a/src/app/components/admin/containers/DashboardContainer.tsx b/src/app/components/admin/containers/DashboardContainer.tsx index d9f4d487..795a2c44 100644 --- a/src/app/components/admin/containers/DashboardContainer.tsx +++ b/src/app/components/admin/containers/DashboardContainer.tsx @@ -1,3 +1,4 @@ +'use client' import { useEffect, useState } from 'react' import JobAnal from '../dashboard/JobAnal' import PointAnal from '../dashboard/PointAnal' diff --git a/src/app/components/signup/Complete.tsx b/src/app/components/signup/Complete.tsx index d9061a6e..c3955a94 100644 --- a/src/app/components/signup/Complete.tsx +++ b/src/app/components/signup/Complete.tsx @@ -1,3 +1,5 @@ +'use client' + import { COMPLETE } from '@/app/constants/auth' import Image from 'next/image' import { useRouter } from 'next/navigation' diff --git a/src/app/components/signup/containers/SignupContainer.tsx b/src/app/components/signup/containers/SignupContainer.tsx index 0c339b5e..0133f8c4 100644 --- a/src/app/components/signup/containers/SignupContainer.tsx +++ b/src/app/components/signup/containers/SignupContainer.tsx @@ -48,7 +48,7 @@ const SignupContainer = () => { ) if (res.ok) { router.push('/signup/onboard') - }else{ + } else { setAuthCode('') mismatchAlert() } @@ -87,7 +87,7 @@ const SignupContainer = () => { onChange={(e) => setAuthCode(e.target.value)} placeholder="인증코드 입력하기" textValue={authCode} - onEnterPress={() =>authorizeCode(email, authCode)} + onEnterPress={() => authorizeCode(email, authCode)} />
From d377d618a3d847e16986de12b55c421da74f455a Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 17:16:50 +0900 Subject: [PATCH 10/17] =?UTF-8?q?:recycle:=20refactor:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20=EC=84=A0=EC=96=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(route)/edit-coverletter/[id]/page.tsx | 7 +- .../mypage/myCovletDetail/[id]/page.tsx | 15 ---- .../board/containers/UserExpDetailModal1.tsx | 72 +----------------- .../board/containers/UserExpDetailModal2.tsx | 72 +----------------- .../board/containers/UserExpDetailModal3.tsx | 76 ++----------------- .../experience/ExpFinishContainer.tsx | 50 ------------ .../components/experience/ExpFinishModal1.tsx | 15 ---- .../components/experience/ExpFinishModal2.tsx | 17 +---- .../components/experience/ExpFinishModal3.tsx | 17 +---- src/app/components/experience/Stack.tsx | 4 +- .../main/containers/CardContainer.tsx | 4 +- src/app/components/mypage/EditUserInfo.tsx | 5 -- src/app/components/mypage/MyBoard.tsx | 4 +- .../components/mypage/MyCovletCardDetail.tsx | 4 - src/app/components/mypage/PointCharge.tsx | 11 --- .../components/mypage/WithDrawContainer.tsx | 9 +-- .../mypage/common/CommentContainer2.tsx | 4 +- .../components/mypage/common/DeleteModal.tsx | 2 +- .../mypage/common/MyExpDetailModal1.tsx | 17 +---- .../mypage/common/MyExpDetailModal2.tsx | 17 +---- .../mypage/common/MyExpDetailModal3.tsx | 17 +---- .../signup/onboard/dropdown/DropDownMajor.tsx | 2 +- .../signup/onboard/dropdown/DropDownOB.tsx | 2 +- 23 files changed, 36 insertions(+), 407 deletions(-) diff --git a/src/app/(route)/edit-coverletter/[id]/page.tsx b/src/app/(route)/edit-coverletter/[id]/page.tsx index 758a484a..9b2858a1 100644 --- a/src/app/(route)/edit-coverletter/[id]/page.tsx +++ b/src/app/(route)/edit-coverletter/[id]/page.tsx @@ -4,7 +4,12 @@ import CovletMain from '@/app/components/coverletter/CovletMain' import CovletSave from '@/app/components/coverletter/CovletSave' import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' -import { analysisData, covletData, covletNum, feedbackData } from '@/app/recoil/coverletter' +import { + analysisData, + covletData, + covletNum, + feedbackData, +} from '@/app/recoil/coverletter' import { useRouter } from 'next/navigation' import { useEffect, useState } from 'react' import { useRecoilState } from 'recoil' diff --git a/src/app/(route)/mypage/myCovletDetail/[id]/page.tsx b/src/app/(route)/mypage/myCovletDetail/[id]/page.tsx index aaa805d1..b47e4e3c 100644 --- a/src/app/(route)/mypage/myCovletDetail/[id]/page.tsx +++ b/src/app/(route)/mypage/myCovletDetail/[id]/page.tsx @@ -101,7 +101,6 @@ const MyCovletDetailPage = ({ params }: { params: { id: string } }) => { }) } if (data && data.result && data.result.feedbackInfo) { - setFeedBackData(data.result.feedbackInfo) } if (data && data.result && data.result.analysisInfo) { @@ -150,17 +149,3 @@ const MyCovletDetailPage = ({ params }: { params: { id: string } }) => { ) } export default MyCovletDetailPage -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} \ No newline at end of file diff --git a/src/app/components/board/containers/UserExpDetailModal1.tsx b/src/app/components/board/containers/UserExpDetailModal1.tsx index 55e27a39..87beb120 100644 --- a/src/app/components/board/containers/UserExpDetailModal1.tsx +++ b/src/app/components/board/containers/UserExpDetailModal1.tsx @@ -1,14 +1,10 @@ 'use client' -import { useRecoilState } from 'recoil' -import { expNum, expData, modalNum } from '../../../recoil/experience' -import { useRouter } from 'next/navigation' -import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import NextArrow from '@/app/ui/svg/arrow/NextArrow' -import { useEffect, useState } from 'react' -import { useModal } from '@/app/hooks/useModal' -import DeleteModal from '../../admin/common/DeleteModal' -import { useModal2 } from '@/app/hooks/useModal2' +import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' +import { useState } from 'react' +import { useRecoilState } from 'recoil' +import { modalNum } from '../../../recoil/experience' interface ExperienceCardDetail { experienceId: number @@ -40,12 +36,8 @@ const UserExpDetailModal1 = ({ closeModal, }: ExperienceCardDetail) => { console.log(experienceId, 'id 수정 삭제에서 가져오기') - const [experienceNumber, setExperienceNumber] = useRecoilState(expNum) - const [experienceData, setExperienceData] = useRecoilState(expData) const [pageNumber, setPageNumber] = useRecoilState(modalNum) const [isHovered, setIsHovered] = useState(false) - const { isOpen, openmodal, closemodal, handlemodalClick } = useModal2(false) - const router = useRouter() const handleModalClick = ( event: React.MouseEvent, ) => { @@ -59,7 +51,6 @@ const UserExpDetailModal1 = ({ if (pageNumber < totalPages - 1) { setPageNumber(pageNumber + 1) } else { - // 마지막 페이지에서 'Next' 클릭 시 첫 페이지로 이동 setPageNumber(0) } } @@ -68,7 +59,6 @@ const UserExpDetailModal1 = ({ if (pageNumber > 0) { setPageNumber(pageNumber - 1) } else { - // 첫 페이지에서 'Prev' 클릭 시 마지막 페이지로 이동 setPageNumber(totalPages - 1) } } @@ -89,45 +79,6 @@ const UserExpDetailModal1 = ({ return keyword } } - const onEditClick = () => { - setExperienceData({ - title, - startDate, - endDate, - experienceType, - task, - motivation, - detail, - advance, - stack, - jobKeyword, - expStacks: stack.split(' / '), - }) - - router.push(`/edit-experience/${experienceId}`) - } - - const deleteExp = async (experienceId: number) => { - console.log('경험카드 삭제 요청이에요', experienceId) - try { - const res = await fetch( - `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/mypage/myExp/delete?experienceId=${experienceId}`, - { - method: 'DELETE', - }, - ) - - if (res.ok) { - console.log('경험카드가 성공적으로 삭제되었습니다.') - window.location.reload() - } else { - const errorData = await res.json() - console.error('Error details:', errorData) - } - } catch (error) { - console.error('Network or other error:', error) - } - } return (
@@ -245,18 +196,3 @@ const UserExpDetailModal1 = ({ } export default UserExpDetailModal1 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/board/containers/UserExpDetailModal2.tsx b/src/app/components/board/containers/UserExpDetailModal2.tsx index 51f8a161..be6f8267 100644 --- a/src/app/components/board/containers/UserExpDetailModal2.tsx +++ b/src/app/components/board/containers/UserExpDetailModal2.tsx @@ -1,15 +1,10 @@ 'use client' -import { useRecoilState } from 'recoil' -import { expNum, expData, modalNum } from '../../../recoil/experience' -import { useRouter } from 'next/navigation' -import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import NextArrow from '@/app/ui/svg/arrow/NextArrow' +import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useState } from 'react' -import { useModal } from '@/app/hooks/useModal' -import DeleteModal from '../../admin/common/DeleteModal' -import { useModal2 } from '@/app/hooks/useModal2' -import DeleteModal2 from '../../admin/common/DeleteModal2' +import { useRecoilState } from 'recoil' +import { modalNum } from '../../../recoil/experience' interface ExperienceCardDetail { experienceId: number @@ -40,12 +35,8 @@ const UserExpDetailModal2 = ({ advance, closeModal, }: ExperienceCardDetail & { isGuest?: boolean }) => { - const [experienceNumber, setExperienceNumber] = useRecoilState(expNum) - const [experienceData, setExperienceData] = useRecoilState(expData) const [pageNumber, setPageNumber] = useRecoilState(modalNum) const [isHovered, setIsHovered] = useState(false) - const { isOpen, openmodal, closemodal, handlemodalClick } = useModal2(false) - const router = useRouter() const handleModalClick = ( event: React.MouseEvent, ) => { @@ -59,7 +50,6 @@ const UserExpDetailModal2 = ({ if (pageNumber < totalPages - 1) { setPageNumber(pageNumber + 1) } else { - // 마지막 페이지에서 'Next' 클릭 시 첫 페이지로 이동 setPageNumber(0) } } @@ -68,7 +58,6 @@ const UserExpDetailModal2 = ({ if (pageNumber > 0) { setPageNumber(pageNumber - 1) } else { - // 첫 페이지에서 'Prev' 클릭 시 마지막 페이지로 이동 setPageNumber(totalPages - 1) } } @@ -90,46 +79,6 @@ const UserExpDetailModal2 = ({ } } - const onEditClick = () => { - setExperienceData({ - title, - startDate, - endDate, - experienceType, - task, - motivation, - detail, - advance, - stack, - jobKeyword, - expStacks: stack.split(' / '), - }) - - router.push(`/edit-experience/${experienceId}`) - } - - const deleteExp = async (experienceId: number) => { - console.log('경험카드 삭제 요청이에요', experienceId) - try { - const res = await fetch( - `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/mypage/myExp/delete?experienceId=${experienceId}`, - { - method: 'DELETE', - }, - ) - - if (res.ok) { - console.log('경험카드가 성공적으로 삭제되었습니다.') - window.location.reload() - } else { - const errorData = await res.json() - console.error('Error details:', errorData) - } - } catch (error) { - console.error('Network or other error:', error) - } - } - return (
@@ -239,18 +188,3 @@ const UserExpDetailModal2 = ({ } export default UserExpDetailModal2 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/board/containers/UserExpDetailModal3.tsx b/src/app/components/board/containers/UserExpDetailModal3.tsx index b05be051..0b4bd645 100644 --- a/src/app/components/board/containers/UserExpDetailModal3.tsx +++ b/src/app/components/board/containers/UserExpDetailModal3.tsx @@ -1,15 +1,10 @@ 'use client' -import { useRecoilState } from 'recoil' -import { expNum, expData, modalNum } from '../../../recoil/experience' -import { useRouter } from 'next/navigation' -import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import NextArrow from '@/app/ui/svg/arrow/NextArrow' +import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useState } from 'react' -import { useModal } from '@/app/hooks/useModal' -import DeleteModal from '../../admin/common/DeleteModal' -import { useModal2 } from '@/app/hooks/useModal2' -import DeleteModal2 from '../../admin/common/DeleteModal2' +import { useRecoilState } from 'recoil' +import { modalNum } from '../../../recoil/experience' interface ExperienceCardDetail { experienceId: number @@ -40,12 +35,8 @@ const UserExpDetailModal3 = ({ advance, closeModal, }: ExperienceCardDetail & { isGuest?: boolean }) => { - const [experienceNumber, setExperienceNumber] = useRecoilState(expNum) - const [experienceData, setExperienceData] = useRecoilState(expData) const [pageNumber, setPageNumber] = useRecoilState(modalNum) const [isHovered, setIsHovered] = useState(false) - const { isOpen, openmodal, closemodal, handlemodalClick } = useModal2(false) - const router = useRouter() const handleModalClick = ( event: React.MouseEvent, ) => { @@ -59,7 +50,6 @@ const UserExpDetailModal3 = ({ if (pageNumber < totalPages - 1) { setPageNumber(pageNumber + 1) } else { - // 마지막 페이지에서 'Next' 클릭 시 첫 페이지로 이동 setPageNumber(0) } } @@ -68,7 +58,6 @@ const UserExpDetailModal3 = ({ if (pageNumber > 0) { setPageNumber(pageNumber - 1) } else { - // 첫 페이지에서 'Prev' 클릭 시 마지막 페이지로 이동 setPageNumber(totalPages - 1) } } @@ -90,46 +79,6 @@ const UserExpDetailModal3 = ({ } } - const onEditClick = () => { - setExperienceData({ - title, - startDate, - endDate, - experienceType, - task, - motivation, - detail, - advance, - stack, - jobKeyword, - expStacks: stack.split(' / '), - }) - - router.push(`/edit-experience/${experienceId}`) - } - - const deleteExp = async (experienceId: number) => { - console.log('경험카드 삭제 요청이에요', experienceId) - try { - const res = await fetch( - `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/mypage/myExp/delete?experienceId=${experienceId}`, - { - method: 'DELETE', - }, - ) - - if (res.ok) { - console.log('경험카드가 성공적으로 삭제되었습니다.') - window.location.reload() - } else { - const errorData = await res.json() - console.error('Error details:', errorData) - } - } catch (error) { - console.error('Network or other error:', error) - } - } - return (
@@ -170,7 +119,7 @@ const UserExpDetailModal3 = ({
{ - event.stopPropagation() // 다른 이벤트와 충돌을 방지하기 위해 이벤트 전파를 멈추는 코드를 추가 + event.stopPropagation() handlePrevClick() }} > @@ -179,7 +128,7 @@ const UserExpDetailModal3 = ({
{ - event.stopPropagation() // 다른 이벤트와 충돌을 방지하기 위해 이벤트 전파를 멈추는 코드를 추가 + event.stopPropagation() handleNextClick() }} > @@ -239,18 +188,3 @@ const UserExpDetailModal3 = ({ } export default UserExpDetailModal3 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/experience/ExpFinishContainer.tsx b/src/app/components/experience/ExpFinishContainer.tsx index dee0f43f..e16c0c3e 100644 --- a/src/app/components/experience/ExpFinishContainer.tsx +++ b/src/app/components/experience/ExpFinishContainer.tsx @@ -1,6 +1,5 @@ 'use client' -import { useRouter } from 'next/navigation' import { useRecoilState } from 'recoil' import { expData, expNum, modalNum } from '../../recoil/experience' import ExpFinishModal1 from './ExpFinishModal1' @@ -11,24 +10,6 @@ const ExpFinishContainer = () => { const [experienceNumber, setExperienceNumber] = useRecoilState(expNum) const [experienceData, setExperienceData] = useRecoilState(expData) const [pageNumber, setPageNumber] = useRecoilState(modalNum) - const router = useRouter() - - const displayKeyword = (keyword: any) => { - switch (keyword) { - case 'BACKEND': - return '백엔드' - case 'AI': - return 'AI' - case 'WEB': - return '웹개발' - case 'APP': - return '앱개발' - case 'DESIGN': - return '디자인' - default: - return keyword - } - } const getCurrentModal = () => { switch (pageNumber) { @@ -55,22 +36,6 @@ const ExpFinishContainer = () => { [event.target.name]: event.target.value, }) } - const handleButtonClick = () => { - setExperienceData({ - title: '', - startDate: '', - endDate: '', - experienceType: '', - task: '', - motivation: '', - jobKeyword: '', - stack: '', - detail: '', - advance: '', - expStacks: [], - }) - router.push('/mypage/myexperience') - } const saveExpData = async () => { const { expStacks, ...dataToSend } = experienceData @@ -205,18 +170,3 @@ const ExpFinishContainer = () => { } export default ExpFinishContainer - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/experience/ExpFinishModal1.tsx b/src/app/components/experience/ExpFinishModal1.tsx index 470a1c9a..b2f1311f 100644 --- a/src/app/components/experience/ExpFinishModal1.tsx +++ b/src/app/components/experience/ExpFinishModal1.tsx @@ -152,18 +152,3 @@ const ExpFinishModal1 = () => { } export default ExpFinishModal1 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/experience/ExpFinishModal2.tsx b/src/app/components/experience/ExpFinishModal2.tsx index 1b1d3e8b..d4f50e4f 100644 --- a/src/app/components/experience/ExpFinishModal2.tsx +++ b/src/app/components/experience/ExpFinishModal2.tsx @@ -5,7 +5,7 @@ import NextArrow from '@/app/ui/svg/arrow/NextArrow' import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useRouter } from 'next/navigation' import { useRecoilState } from 'recoil' -import { expData, expNum, modalNum } from '../../recoil/experience' +import { expData, modalNum } from '../../recoil/experience' const ExpFinishModal2 = () => { const [experienceData, setExperienceData] = useRecoilState(expData) @@ -144,18 +144,3 @@ const ExpFinishModal2 = () => { } export default ExpFinishModal2 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/experience/ExpFinishModal3.tsx b/src/app/components/experience/ExpFinishModal3.tsx index 0e799248..3f1d9b62 100644 --- a/src/app/components/experience/ExpFinishModal3.tsx +++ b/src/app/components/experience/ExpFinishModal3.tsx @@ -5,7 +5,7 @@ import NextArrow from '@/app/ui/svg/arrow/NextArrow' import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useRouter } from 'next/navigation' import { useRecoilState } from 'recoil' -import { expData, expNum, modalNum } from '../../recoil/experience' +import { expData, modalNum } from '../../recoil/experience' const ExpFinishModal3 = () => { const [experienceData, setExperienceData] = useRecoilState(expData) @@ -145,18 +145,3 @@ const ExpFinishModal3 = () => { } export default ExpFinishModal3 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/experience/Stack.tsx b/src/app/components/experience/Stack.tsx index d0017ac0..6244bd99 100644 --- a/src/app/components/experience/Stack.tsx +++ b/src/app/components/experience/Stack.tsx @@ -1,9 +1,9 @@ 'use client' -import NameBox from '@/app/components/experience/NameBox' import Button from '@/app/components/common/Button' import Input from '@/app/components/common/Input' +import NameBox from '@/app/components/experience/NameBox' import Header from '@/app/components/layout/Header' -import React, { useState } from 'react' +import { useState } from 'react' const Stack = () => { const [name, setName] = useState('') diff --git a/src/app/components/main/containers/CardContainer.tsx b/src/app/components/main/containers/CardContainer.tsx index 2018dee8..7483adc0 100644 --- a/src/app/components/main/containers/CardContainer.tsx +++ b/src/app/components/main/containers/CardContainer.tsx @@ -1,12 +1,12 @@ 'use client' import { Swiper, SwiperSlide } from 'swiper/react' +import { Autoplay, EffectCoverflow, Pagination } from 'swiper/modules' import Card from '../../common/Card' -import { Pagination, Autoplay, EffectCoverflow } from 'swiper/modules' import 'swiper/css' -import 'swiper/css/pagination' import 'swiper/css/effect-coverflow' +import 'swiper/css/pagination' interface CardContainerProps { cardData: CardDataTypes[] } diff --git a/src/app/components/mypage/EditUserInfo.tsx b/src/app/components/mypage/EditUserInfo.tsx index ee6c18d8..0733e468 100644 --- a/src/app/components/mypage/EditUserInfo.tsx +++ b/src/app/components/mypage/EditUserInfo.tsx @@ -16,7 +16,6 @@ import { PROFILE_EMOJI_PT1, PROFILE_EMOJI_PT2, } from '@/app/constants/signup' -import { userData } from '@/app/recoil/mypage' import { failVerifyPw, pwAlert, @@ -82,17 +81,13 @@ const EditUserInfo = () => { const [password, setPassWord] = useState('') const [checkPW, setCheckPW] = useState('') - const [pw, setPw] = useState('') const [clickedKeyword, setClickedKeyword] = useState('백엔드') const [grade, setGrade] = useState('1학년') const [profile, setProfile] = useState(0) const [isHovered, setIsHovered] = useState(false) const [major, setMajor] = useState('') - const isEntered = pw !== '' && major !== '' const isSame = checkPW === password const [userInfos, setUserInfos] = useState() - const [isOpen, setIsOpen] = useState(false) - const [profileIndex, setProfileIndex] = useState() const updateUser = async () => { const requestBody: UpdateUserInfoRequest = { diff --git a/src/app/components/mypage/MyBoard.tsx b/src/app/components/mypage/MyBoard.tsx index 39cc8693..15c07580 100644 --- a/src/app/components/mypage/MyBoard.tsx +++ b/src/app/components/mypage/MyBoard.tsx @@ -1,9 +1,9 @@ 'use client' +import { boardNum } from '@/app/recoil/mypage' import { useEffect, useState } from 'react' -import MyBoardCard from './MyBoardCard' import { useRecoilState } from 'recoil' -import { boardNum } from '@/app/recoil/mypage' +import MyBoardCard from './MyBoardCard' interface BoardCard { title?: string content?: string diff --git a/src/app/components/mypage/MyCovletCardDetail.tsx b/src/app/components/mypage/MyCovletCardDetail.tsx index c05a4ff0..9541a742 100644 --- a/src/app/components/mypage/MyCovletCardDetail.tsx +++ b/src/app/components/mypage/MyCovletCardDetail.tsx @@ -72,12 +72,8 @@ const MyCovletCardDetail = ({ textArea.select() try { - const successful = document.execCommand('copy') - const msg = successful ? 'successful' : 'unsuccessful' - alert('Text copied to clipboard!') } catch (err) { - console.error('Failed to copy text: ', err) alert('Failed to copy text.') } diff --git a/src/app/components/mypage/PointCharge.tsx b/src/app/components/mypage/PointCharge.tsx index fd1d0655..ceaf3d7f 100644 --- a/src/app/components/mypage/PointCharge.tsx +++ b/src/app/components/mypage/PointCharge.tsx @@ -10,17 +10,6 @@ import ChargePoint from '../points/ChargePoint' import PaymentCard from './PaymentCard' import ReactPaginate from 'react-paginate' -interface UserInfoProps { - email: string - grade: string - major: string - jobKeyword: onlyJobType - memberId?: number - point: number - status: string - registrationDate: string -} - interface UserPoint { myPoint: number isFirst: boolean diff --git a/src/app/components/mypage/WithDrawContainer.tsx b/src/app/components/mypage/WithDrawContainer.tsx index d94874d3..1f3fd35d 100644 --- a/src/app/components/mypage/WithDrawContainer.tsx +++ b/src/app/components/mypage/WithDrawContainer.tsx @@ -1,13 +1,11 @@ 'use client' -import { useEffect, useState } from 'react' -import Link from 'next/link' -import { useRouter } from 'next/navigation' -import { logout } from '@/app/utils/cookies' import { useModal } from '@/app/hooks/useModal' -import DeleteModal from './common/DeleteModal' import { failVerifyPw, successVerifyPw } from '@/app/utils/toast' +import Link from 'next/link' +import { useEffect, useState } from 'react' import { ToastContainer } from 'react-toastify' +import DeleteModal from './common/DeleteModal' interface UserInfoProps { email: string @@ -21,7 +19,6 @@ interface UserInfoProps { } const WithDrawContainer = () => { - const router = useRouter() const [userInfos, setUserInfos] = useState() const { isOpen, openModal, closeModal, handleModalClick } = useModal(false) const [passwordVerified, setPasswordVerified] = useState(false) diff --git a/src/app/components/mypage/common/CommentContainer2.tsx b/src/app/components/mypage/common/CommentContainer2.tsx index ee85e1c3..dc7cc2b8 100644 --- a/src/app/components/mypage/common/CommentContainer2.tsx +++ b/src/app/components/mypage/common/CommentContainer2.tsx @@ -1,14 +1,12 @@ 'use client' -import { selectedPostId } from '@/app/recoil/board' import CommentUp from '@/app/ui/svg/main/CommentUp' import Like from '@/app/ui/svg/main/Like' import { useEffect, useState } from 'react' import { ToastContainer } from 'react-toastify' import 'react-toastify/dist/ReactToastify.css' -import { useRecoilState } from 'recoil' -import Button from '../../common/Button' import Comment from '../../board/Comment' +import Button from '../../common/Button' interface CommentContainerProps { postId: number diff --git a/src/app/components/mypage/common/DeleteModal.tsx b/src/app/components/mypage/common/DeleteModal.tsx index ce3fb77a..a926c989 100644 --- a/src/app/components/mypage/common/DeleteModal.tsx +++ b/src/app/components/mypage/common/DeleteModal.tsx @@ -1,10 +1,10 @@ 'use client' import { close } from '@/app/ui/IconsPath' +import { logout } from '@/app/utils/cookies' import { useRouter } from 'next/navigation' import { useEffect, useState } from 'react' import Icons from '../../common/Icons' -import { logout } from '@/app/utils/cookies' interface DeleteModalProps { closeModal: () => void diff --git a/src/app/components/mypage/common/MyExpDetailModal1.tsx b/src/app/components/mypage/common/MyExpDetailModal1.tsx index 44983d00..fe900ba8 100644 --- a/src/app/components/mypage/common/MyExpDetailModal1.tsx +++ b/src/app/components/mypage/common/MyExpDetailModal1.tsx @@ -6,7 +6,7 @@ import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useRouter } from 'next/navigation' import { useState } from 'react' import { useRecoilState } from 'recoil' -import { expData, expNum, modalNum } from '../../../recoil/experience' +import { expData, modalNum } from '../../../recoil/experience' import DeleteModal from '../../admin/common/DeleteModal' interface ExperienceCardDetail { @@ -258,18 +258,3 @@ const MyExpDetailModal1 = ({ } export default MyExpDetailModal1 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/mypage/common/MyExpDetailModal2.tsx b/src/app/components/mypage/common/MyExpDetailModal2.tsx index 5e523a3b..f2812ec5 100644 --- a/src/app/components/mypage/common/MyExpDetailModal2.tsx +++ b/src/app/components/mypage/common/MyExpDetailModal2.tsx @@ -6,7 +6,7 @@ import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useRouter } from 'next/navigation' import { useState } from 'react' import { useRecoilState } from 'recoil' -import { expData, expNum, modalNum } from '../../../recoil/experience' +import { expData, modalNum } from '../../../recoil/experience' import DeleteModal from '../../admin/common/DeleteModal' interface ExperienceCardDetail { @@ -251,18 +251,3 @@ const MyExpDetailModal2 = ({ } export default MyExpDetailModal2 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/mypage/common/MyExpDetailModal3.tsx b/src/app/components/mypage/common/MyExpDetailModal3.tsx index 4753219d..a2946b3e 100644 --- a/src/app/components/mypage/common/MyExpDetailModal3.tsx +++ b/src/app/components/mypage/common/MyExpDetailModal3.tsx @@ -6,7 +6,7 @@ import PrevArrow from '@/app/ui/svg/arrow/PrevArrow' import { useRouter } from 'next/navigation' import { useState } from 'react' import { useRecoilState } from 'recoil' -import { expData, expNum, modalNum } from '../../../recoil/experience' +import { expData, modalNum } from '../../../recoil/experience' import DeleteModal from '../../admin/common/DeleteModal' interface ExperienceCardDetail { @@ -252,18 +252,3 @@ const MyExpDetailModal3 = ({ } export default MyExpDetailModal3 - -const transKeyword = (keyword: string) => { - switch (keyword) { - case '백엔드': - return 'BACKEND' - case 'AI': - return 'AI' - case '웹개발': - return 'WEB' - case '앱개발': - return 'APP' - case '디자인': - return 'DESIGN' - } -} diff --git a/src/app/components/signup/onboard/dropdown/DropDownMajor.tsx b/src/app/components/signup/onboard/dropdown/DropDownMajor.tsx index a2efaa1c..847c8302 100644 --- a/src/app/components/signup/onboard/dropdown/DropDownMajor.tsx +++ b/src/app/components/signup/onboard/dropdown/DropDownMajor.tsx @@ -1,7 +1,7 @@ 'use client' +import { dropdown } from '@/app/ui/IconsPath' import { useEffect, useRef, useState } from 'react' import Icons from '../../../common/Icons' -import { dropdown } from '@/app/ui/IconsPath' interface DropDownMajorProps { options: any[] diff --git a/src/app/components/signup/onboard/dropdown/DropDownOB.tsx b/src/app/components/signup/onboard/dropdown/DropDownOB.tsx index 28b8fce8..edaf68c6 100644 --- a/src/app/components/signup/onboard/dropdown/DropDownOB.tsx +++ b/src/app/components/signup/onboard/dropdown/DropDownOB.tsx @@ -1,7 +1,7 @@ 'use client' +import { dropdown } from '@/app/ui/IconsPath' import { useEffect, useRef, useState } from 'react' import Icons from '../../../common/Icons' -import { dropdown } from '@/app/ui/IconsPath' interface DropDownOBProps { options: readonly GradeEnum[] From 5d0b821e0428118627a4509894bbb104895be965 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 17:21:20 +0900 Subject: [PATCH 11/17] =?UTF-8?q?:recycle:=20refactor:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20=EC=BD=98=EC=86=94=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(route)/board/post/employment/page.tsx | 1 - src/app/(route)/board/post/group/page.tsx | 1 - .../(route)/board/update/employment/page.tsx | 1 - src/app/(route)/board/update/group/page.tsx | 1 - src/app/(route)/coverletter/feedback/page.tsx | 1 - src/app/(route)/userpage/[id]/page.tsx | 9 +++--- src/app/api/admin/board/delete/route.ts | 1 - src/app/api/admin/dashboard/route.ts | 2 -- src/app/api/admin/model/active/route.ts | 1 - src/app/api/admin/model/detail/route.ts | 2 -- src/app/api/admin/payment/route.ts | 1 - src/app/api/admin/point/route.ts | 1 - src/app/api/admin/user/route.ts | 1 - src/app/api/board/detail/route.ts | 2 -- src/app/api/kakaopay/tid/approve/route.ts | 1 - src/app/api/login/logout/route.ts | 1 - src/app/api/main/route.ts | 1 - src/app/api/point/check/route.ts | 1 - src/app/api/signup/route.ts | 1 - src/app/api/userpage/coverletter/route.ts | 2 -- src/app/api/userpage/expcard/route.ts | 2 -- src/app/components/admin/model/ModelAnal.tsx | 1 - .../components/admin/point/PaymentAnal.tsx | 2 -- .../board/containers/JobBoardContainer.tsx | 1 - .../board/containers/OtherUserPortfolio.tsx | 1 - .../board/containers/UserExpCard.tsx | 1 - .../board/containers/UserExpDetailModal1.tsx | 1 - src/app/components/board/job/JobPost.tsx | 1 - src/app/components/coverletter/CovletMain.tsx | 2 -- src/app/components/coverletter/CovletSave.tsx | 4 --- src/app/components/experience/Stack.tsx | 2 -- .../mypage/common/CommentContainer2.tsx | 1 - .../signup/containers/OnBoardContainer.tsx | 2 -- src/app/service/deleteReq.ts | 28 ------------------- src/app/service/patchRequest.ts | 1 - src/app/service/postReq.ts | 2 -- src/app/service/postRequests.ts | 3 -- src/app/service/updateReq.ts | 1 - 38 files changed, 4 insertions(+), 84 deletions(-) diff --git a/src/app/(route)/board/post/employment/page.tsx b/src/app/(route)/board/post/employment/page.tsx index c3b1dba4..d0b959e1 100644 --- a/src/app/(route)/board/post/employment/page.tsx +++ b/src/app/(route)/board/post/employment/page.tsx @@ -17,7 +17,6 @@ export default function PostEmploymentPage() { ) const resData = await response.json() setUser(resData.result) - console.log(resData) } getUser() }, [nickname]) diff --git a/src/app/(route)/board/post/group/page.tsx b/src/app/(route)/board/post/group/page.tsx index 1cdc5054..1b9c363d 100644 --- a/src/app/(route)/board/post/group/page.tsx +++ b/src/app/(route)/board/post/group/page.tsx @@ -17,7 +17,6 @@ export default function PostGroupPage() { ) const resData = await response.json() setUser(resData.result) - console.log(resData) } getUser() }, [nickname]) diff --git a/src/app/(route)/board/update/employment/page.tsx b/src/app/(route)/board/update/employment/page.tsx index 1a1cc719..b8e1d038 100644 --- a/src/app/(route)/board/update/employment/page.tsx +++ b/src/app/(route)/board/update/employment/page.tsx @@ -18,7 +18,6 @@ export default function PatchEmploymentPage() { ) const resData = await response.json() setUser(resData.result) - console.log(resData) } getUser() }, [id]) diff --git a/src/app/(route)/board/update/group/page.tsx b/src/app/(route)/board/update/group/page.tsx index c6cd08cb..b56f7713 100644 --- a/src/app/(route)/board/update/group/page.tsx +++ b/src/app/(route)/board/update/group/page.tsx @@ -18,7 +18,6 @@ export default function PatchGroupPage() { ) const resData = await response.json() setUser(resData.result) - console.log(resData) } getUser() }, [id]) diff --git a/src/app/(route)/coverletter/feedback/page.tsx b/src/app/(route)/coverletter/feedback/page.tsx index 51c26cc9..bb17fd31 100644 --- a/src/app/(route)/coverletter/feedback/page.tsx +++ b/src/app/(route)/coverletter/feedback/page.tsx @@ -21,7 +21,6 @@ export default function CovletFeedbackPage() { ) const resData = await response.json() setUser(resData.result) - console.log(resData) } fetchData() diff --git a/src/app/(route)/userpage/[id]/page.tsx b/src/app/(route)/userpage/[id]/page.tsx index 8e1cdc2f..5fb1101a 100644 --- a/src/app/(route)/userpage/[id]/page.tsx +++ b/src/app/(route)/userpage/[id]/page.tsx @@ -5,10 +5,11 @@ import Footer from '@/app/components/layout/Footer' import Header from '@/app/components/layout/Header' import { useEffect, useState } from 'react' - export default function UserPage({ params }: { params: { id: string } }) { const [userInfo, setUser] = useState(null) - const [otherUserInfo, setOtherUser] = useState<{ profile: string } | null>(null) + const [otherUserInfo, setOtherUser] = useState<{ profile: string } | null>( + null, + ) const [covletCards, setCovletCards] = useState([]) const [expCards, setExpCards] = useState([]) const [isExp, setIsExp] = useState(false) @@ -35,8 +36,6 @@ export default function UserPage({ params }: { params: { id: string } }) { }, }) const data = await response.json() - console.log(data, '가져온 자소서 데이터') - console.log('프로필', data.result?.profile) if (data.isSuccess && data.result?.profile) { setOtherUser({ @@ -60,7 +59,7 @@ export default function UserPage({ params }: { params: { id: string } }) {
- +
diff --git a/src/app/api/admin/board/delete/route.ts b/src/app/api/admin/board/delete/route.ts index eb2f9f70..f5ed1023 100644 --- a/src/app/api/admin/board/delete/route.ts +++ b/src/app/api/admin/board/delete/route.ts @@ -6,7 +6,6 @@ export async function DELETE(request: Request): Promise { const accessToken = getCookie(request, 'accessToken') const { searchParams } = new URL(request.url) const postId = searchParams.get('postId') || '' - console.log(postId, '로 게시물 삭제 요청') const data = await deletePostAdmin(accessToken, postId) return NextResponse.json(data) diff --git a/src/app/api/admin/dashboard/route.ts b/src/app/api/admin/dashboard/route.ts index 9571e464..887389e2 100644 --- a/src/app/api/admin/dashboard/route.ts +++ b/src/app/api/admin/dashboard/route.ts @@ -5,7 +5,5 @@ import { NextResponse } from 'next/server' export async function GET(request: Request): Promise { let accessToken = getCookie(request, 'accessToken') const data = await getDashBoard(accessToken).then((data) => data) - console.log(data, '대쉬보드 요청이에요') - return NextResponse.json(data) } diff --git a/src/app/api/admin/model/active/route.ts b/src/app/api/admin/model/active/route.ts index e846504d..d3fd138a 100644 --- a/src/app/api/admin/model/active/route.ts +++ b/src/app/api/admin/model/active/route.ts @@ -7,6 +7,5 @@ export async function POST(request: Request) { const { searchParams } = new URL(request.url) const id = searchParams.get('id') || '' const data = await activeModel(accessToken, id) - console.log(data, '모델 버전 변경 넥스트 서버') return NextResponse.json(data) } diff --git a/src/app/api/admin/model/detail/route.ts b/src/app/api/admin/model/detail/route.ts index 10ed507e..a49d7730 100644 --- a/src/app/api/admin/model/detail/route.ts +++ b/src/app/api/admin/model/detail/route.ts @@ -6,8 +6,6 @@ export async function POST(request: Request): Promise { const { searchParams } = new URL(request.url) const id = searchParams.get('id') || '' const accessToken = getCookie(request, 'accessToken') - console.log(id, 'url로 가져온 id') - const data = await postmodelDetail(accessToken, id).then((data) => data) return NextResponse.json(data) diff --git a/src/app/api/admin/payment/route.ts b/src/app/api/admin/payment/route.ts index 1ad26b04..8ce7aec9 100644 --- a/src/app/api/admin/payment/route.ts +++ b/src/app/api/admin/payment/route.ts @@ -7,7 +7,6 @@ export async function GET(request: Request): Promise { const year = searchParams.get('year') || '' const month = searchParams.get('month') || '' const page = searchParams.get('page') || '' - console.log(year, month, 'url로 가져온 연, 월') const accessToken = getCookie(request, 'accessToken') const data = await getPayment(accessToken, year, month, page).then( diff --git a/src/app/api/admin/point/route.ts b/src/app/api/admin/point/route.ts index ae211dd6..f7c3fdce 100644 --- a/src/app/api/admin/point/route.ts +++ b/src/app/api/admin/point/route.ts @@ -6,7 +6,6 @@ export async function GET(request: Request): Promise { const { searchParams } = new URL(request.url) const year = searchParams.get('year') || '' const month = searchParams.get('month') || '' - console.log(year, month, 'url로 가져온 연, 월') const accessToken = getCookie(request, 'accessToken') const data = await getPoint(accessToken, year, month).then((data) => data) diff --git a/src/app/api/admin/user/route.ts b/src/app/api/admin/user/route.ts index aa02ae9c..6d3708cf 100644 --- a/src/app/api/admin/user/route.ts +++ b/src/app/api/admin/user/route.ts @@ -6,7 +6,6 @@ export async function GET(request: Request): Promise { const { searchParams } = new URL(request.url) const jobKeyword = searchParams.get('jobKeyword') || '' const page = searchParams.get('page') || '0' - console.log(jobKeyword) let accessToken = getCookie(request, 'accessToken') const data = await getUser(accessToken, jobKeyword, page).then((data) => data) diff --git a/src/app/api/board/detail/route.ts b/src/app/api/board/detail/route.ts index 03d0cad4..35e94aee 100644 --- a/src/app/api/board/detail/route.ts +++ b/src/app/api/board/detail/route.ts @@ -8,7 +8,5 @@ export async function POST(request: Request) { const id = searchParams.get('id') || '' const data = await postBoardDetail(accessToken, id) - console.log(data, accessToken, id, '디테일 요청') - return NextResponse.json(data) } diff --git a/src/app/api/kakaopay/tid/approve/route.ts b/src/app/api/kakaopay/tid/approve/route.ts index 8b8efff3..a0ad2514 100644 --- a/src/app/api/kakaopay/tid/approve/route.ts +++ b/src/app/api/kakaopay/tid/approve/route.ts @@ -6,6 +6,5 @@ export async function GET(request: Request): Promise { let accessToken = getCookie(request, 'accessToken') const data = await getTid(accessToken).then((data) => data) - console.log(data, 'tid 요청이에요') return NextResponse.json(data) } diff --git a/src/app/api/login/logout/route.ts b/src/app/api/login/logout/route.ts index d679cb4f..d6f86fd7 100644 --- a/src/app/api/login/logout/route.ts +++ b/src/app/api/login/logout/route.ts @@ -6,7 +6,6 @@ export async function DELETE(request: Request): Promise { const accessToken = getCookie(request, 'accessToken') const refreshToken = getCookie(request, 'refreshToken') const data = await logoutRequest(accessToken, refreshToken) - console.log('next서버 로그아웃 처리', data) return NextResponse.json(data) } diff --git a/src/app/api/main/route.ts b/src/app/api/main/route.ts index 7c10c363..71591ca9 100644 --- a/src/app/api/main/route.ts +++ b/src/app/api/main/route.ts @@ -5,7 +5,6 @@ import { NextResponse } from 'next/server' export async function GET(request: Request): Promise { let accessToken = getCookie(request, 'accessToken') const data = await getCardMain(accessToken).then((data) => data) - console.log(data, '카드요청이에요') return NextResponse.json(data) } diff --git a/src/app/api/point/check/route.ts b/src/app/api/point/check/route.ts index 68f946b7..c52a3b13 100644 --- a/src/app/api/point/check/route.ts +++ b/src/app/api/point/check/route.ts @@ -5,7 +5,6 @@ import { NextResponse } from 'next/server' export async function GET(request: Request): Promise { let accessToken = getCookie(request, 'accessToken') const data = await getPointInfo(accessToken).then((data) => data) - console.log(data, '포인트 가져오기') return NextResponse.json(data) } diff --git a/src/app/api/signup/route.ts b/src/app/api/signup/route.ts index bdf816c3..b9f19a89 100644 --- a/src/app/api/signup/route.ts +++ b/src/app/api/signup/route.ts @@ -5,7 +5,6 @@ export async function POST(request: Request) { const content = await request.json() try { const data = await postSignUp(content) - console.log(data, '회원가입 요청 데이터') return NextResponse.json(data) } catch (error) { throw new Error('Error submitting recruiter data') diff --git a/src/app/api/userpage/coverletter/route.ts b/src/app/api/userpage/coverletter/route.ts index d3b57ef4..aa370cec 100644 --- a/src/app/api/userpage/coverletter/route.ts +++ b/src/app/api/userpage/coverletter/route.ts @@ -8,7 +8,5 @@ export async function POST(request: Request) { const id = searchParams.get('id') || '' const data = await postUserCovelet(accessToken, id) - console.log(data, accessToken, id, '디테일 요청') - return NextResponse.json(data) } diff --git a/src/app/api/userpage/expcard/route.ts b/src/app/api/userpage/expcard/route.ts index 4ae0afb7..f3279bbe 100644 --- a/src/app/api/userpage/expcard/route.ts +++ b/src/app/api/userpage/expcard/route.ts @@ -8,7 +8,5 @@ export async function POST(request: Request) { const id = searchParams.get('id') || '' const data = await postUserExpCard(accessToken, id) - console.log(data, accessToken, id, '디테일 요청') - return NextResponse.json(data) } diff --git a/src/app/components/admin/model/ModelAnal.tsx b/src/app/components/admin/model/ModelAnal.tsx index f3d8c5be..0bc8cade 100644 --- a/src/app/components/admin/model/ModelAnal.tsx +++ b/src/app/components/admin/model/ModelAnal.tsx @@ -18,7 +18,6 @@ interface ModelAnalProps { } const ModelAnal = ({ modelEvaluation }: ModelAnalProps) => { - console.log(modelEvaluation, '배열') if (modelEvaluation.length > 2) { const options = { responsive: true, diff --git a/src/app/components/admin/point/PaymentAnal.tsx b/src/app/components/admin/point/PaymentAnal.tsx index f26ca067..6b3b6798 100644 --- a/src/app/components/admin/point/PaymentAnal.tsx +++ b/src/app/components/admin/point/PaymentAnal.tsx @@ -33,7 +33,6 @@ const PaymentAnal = (paymentAnal: PaymentAnalProps) => { } fetchData() }, [page]) - console.log(pageData) const handleMonthChange = (increment: number) => { if (month === '12' && increment === +1) { @@ -51,7 +50,6 @@ const PaymentAnal = (paymentAnal: PaymentAnalProps) => { setMonth(newMonth.toString()) } } - console.log(paymentAnal, '결제 내역') return (
diff --git a/src/app/components/board/containers/JobBoardContainer.tsx b/src/app/components/board/containers/JobBoardContainer.tsx index 0f334186..16d73198 100644 --- a/src/app/components/board/containers/JobBoardContainer.tsx +++ b/src/app/components/board/containers/JobBoardContainer.tsx @@ -4,7 +4,6 @@ import JobPost from '../job/JobPost' const JobBoardContainer = () => { const [boardData, setBoardData] = useRecoilState(boardDataState) - console.log(boardData, '게시물 목록') if (boardData) { return ( diff --git a/src/app/components/board/containers/OtherUserPortfolio.tsx b/src/app/components/board/containers/OtherUserPortfolio.tsx index 363b3ea0..9614a987 100644 --- a/src/app/components/board/containers/OtherUserPortfolio.tsx +++ b/src/app/components/board/containers/OtherUserPortfolio.tsx @@ -14,7 +14,6 @@ const OtherUserPortfolio = ({ username }: OtherUserPortfolioProps) => { const [isExp, setIsExp] = useState(false) const [profile, setProfile] = useState('') const path = isExp ? 'expcard' : 'coverletter' - console.log(covletCards) useEffect(() => { const getData = async () => { diff --git a/src/app/components/board/containers/UserExpCard.tsx b/src/app/components/board/containers/UserExpCard.tsx index a3666f47..0985d032 100644 --- a/src/app/components/board/containers/UserExpCard.tsx +++ b/src/app/components/board/containers/UserExpCard.tsx @@ -59,7 +59,6 @@ const UserExpCard = ({ throw new Error('서버에서 데이터를 가져오는 데 실패했습니다.') } const data = await response.json() - console.log('경험분해 세부정보 조회', data.result.experienceInfo) setExpCards({ ...data.result.experienceInfo, experienceId: experienceId, // experienceId 명시적으로 추가 diff --git a/src/app/components/board/containers/UserExpDetailModal1.tsx b/src/app/components/board/containers/UserExpDetailModal1.tsx index 87beb120..42f970be 100644 --- a/src/app/components/board/containers/UserExpDetailModal1.tsx +++ b/src/app/components/board/containers/UserExpDetailModal1.tsx @@ -35,7 +35,6 @@ const UserExpDetailModal1 = ({ advance, closeModal, }: ExperienceCardDetail) => { - console.log(experienceId, 'id 수정 삭제에서 가져오기') const [pageNumber, setPageNumber] = useRecoilState(modalNum) const [isHovered, setIsHovered] = useState(false) const handleModalClick = ( diff --git a/src/app/components/board/job/JobPost.tsx b/src/app/components/board/job/JobPost.tsx index a7a7b7fb..ebb5f9a5 100644 --- a/src/app/components/board/job/JobPost.tsx +++ b/src/app/components/board/job/JobPost.tsx @@ -15,7 +15,6 @@ const JobPost = ({ data }: JobPostProps) => { const [selectedId, setSelectedId] = useRecoilState(selectedPostId) const [isLiked, setIsliked] = useState(false) const [likeCnt, setLikeCnt] = useState(0) - console.log(data, '게시물 데이터') return (
{ }) } }, [isEdit, id]) - console.log(feedbackInfo, '피드백 데이터') - console.log(analysisInfo, '분석 데이터') const handleToggle = () => { setEnabled(!enabled) diff --git a/src/app/components/coverletter/CovletSave.tsx b/src/app/components/coverletter/CovletSave.tsx index 8fc017d8..8d8be433 100644 --- a/src/app/components/coverletter/CovletSave.tsx +++ b/src/app/components/coverletter/CovletSave.tsx @@ -156,7 +156,6 @@ const CovletSave = () => { jobKeyword, coverLetterId, } = coverletterData -console.log(' 수정 요청'); if (!coverLetterId) { console.error('coverLetterId가 없습니다.') @@ -190,15 +189,12 @@ console.log(' 수정 요청'); jobKeyword, }), }) - console.log(response,' 수정 요청 응답'); - console.log(response,' 수정 요청 시기에 데이터',coverletterData); const resData = await response.json() setCoverLetterData({ ...coverletterData, coverLetterId: resData.result.coverLetterId, }) - console.log(resData,' 수정 요청 응답 데이터 반환'); if (!response.ok) { console.error('데이터 저장에 실패했습니다.') diff --git a/src/app/components/experience/Stack.tsx b/src/app/components/experience/Stack.tsx index 6244bd99..95079561 100644 --- a/src/app/components/experience/Stack.tsx +++ b/src/app/components/experience/Stack.tsx @@ -9,8 +9,6 @@ const Stack = () => { const [name, setName] = useState('') const [names, setNames] = useState([]) - console.log(names.join(',')) // 배열 스트링으로 변환 - const handleDelete = (index: number) => { const newStrings = [...names] newStrings.splice(index, 1) diff --git a/src/app/components/mypage/common/CommentContainer2.tsx b/src/app/components/mypage/common/CommentContainer2.tsx index dc7cc2b8..81e1c837 100644 --- a/src/app/components/mypage/common/CommentContainer2.tsx +++ b/src/app/components/mypage/common/CommentContainer2.tsx @@ -45,7 +45,6 @@ const CommentContainer2 = ({ postId, isLiked }: CommentContainerProps) => { body: JSON.stringify(reqBody), }) const resData = await res.json() - console.log(resData, '댓글응답') const response = await fetch(`/api/board/comment?id=${postId}`) const getRes = await response.json() setComment(getRes.result.commentItems) diff --git a/src/app/components/signup/containers/OnBoardContainer.tsx b/src/app/components/signup/containers/OnBoardContainer.tsx index 7d94fdda..561f8d86 100644 --- a/src/app/components/signup/containers/OnBoardContainer.tsx +++ b/src/app/components/signup/containers/OnBoardContainer.tsx @@ -44,7 +44,6 @@ const OnBoardContainer = () => { const handleClick = (keyword: onlyJobType) => { setClickedKeyword(keyword) } - console.log('현재 이모지 상태', PROFILE_EMOJI[profile]) const signUp = async () => { if ( @@ -60,7 +59,6 @@ const OnBoardContainer = () => { major: major, profile: PROFILE_EMOJI[profile], } - console.log(requestBody) const requestOptions = { method: 'POST', headers: { diff --git a/src/app/service/deleteReq.ts b/src/app/service/deleteReq.ts index 15b55014..1782a9b5 100644 --- a/src/app/service/deleteReq.ts +++ b/src/app/service/deleteReq.ts @@ -3,31 +3,6 @@ const SERVER_URL = process.env.NEXT_PUBLIC_SERVER const commonHeaders = { 'Content-Type': 'application/json', } - -// const deleteRequest = async ( -// url: string, -// accessToken?: string, -// refreshToken?: string, -// ) => { -// try { -// const headers = accessToken -// ? { -// ...commonHeaders, -// Authorization: 'Bearer ' + accessToken, -// RefreshToken: 'Bearer ' + refreshToken, -// } -// : commonHeaders -// const response = await fetch(url, { -// method: 'DELETE', -// headers: headers, -// }).then((res) => res.json()) -// console.log(response) - -// return response -// } catch (error) { -// console.log('Error:', error) -// } -// } const deleteRequest = async ( url: string, accessToken?: string, @@ -41,13 +16,10 @@ const deleteRequest = async ( RefreshToken: 'Bearer ' + refreshToken, } : commonHeaders - console.log(headers, '헤더스') - const response = await fetch(url, { method: 'DELETE', headers: headers, }).then((res) => res.json()) - console.log(response) return response } catch (error) { diff --git a/src/app/service/patchRequest.ts b/src/app/service/patchRequest.ts index f2877d9e..089837ef 100644 --- a/src/app/service/patchRequest.ts +++ b/src/app/service/patchRequest.ts @@ -28,7 +28,6 @@ export const updatePost = async ( id: string, ) => { const url = `${SERVER_URL}/api/boards/${id}` - console.log(url, '요청경로') return await patchRequest(url, postContent, accessToken) } diff --git a/src/app/service/postReq.ts b/src/app/service/postReq.ts index b4d4c0ce..4bb229e2 100644 --- a/src/app/service/postReq.ts +++ b/src/app/service/postReq.ts @@ -27,7 +27,6 @@ export const postExperience = async ( accessToken: string, ) => { const url = `${SERVER_URL}/api/experiences` - console.log(experienceContent, '로 요청') return await postRequest(url, experienceContent, accessToken) } @@ -36,7 +35,6 @@ export const postCoverLetter = async ( accessToken: string, ) => { const url = `${SERVER_URL}/api/coverLetters` - console.log(coverletterContent, '로 요청') return await postRequest(url, coverletterContent, accessToken) } diff --git a/src/app/service/postRequests.ts b/src/app/service/postRequests.ts index 5541eac7..c3f41655 100644 --- a/src/app/service/postRequests.ts +++ b/src/app/service/postRequests.ts @@ -15,7 +15,6 @@ const postRequest = async ( headers: { ...commonHeaders, Authorization: 'Bearer ' + accessToken }, body: JSON.stringify(body), }) - console.log(response, url, '조회하기') return response.json() } catch (error) { @@ -82,7 +81,6 @@ export const postUsingPoint = async ( accessToken: string, ) => { const url = `${SERVER_URL}/api/coverLetters/${id}/points` - console.log(id, '로 포인트', point, '사용') return await postRequest(url, point, accessToken) } @@ -200,7 +198,6 @@ export const postComment = async ( } export const activeModel = async (accessToken: string, id: string) => { - console.log(G_SERVER_URL, ' 서버주소') const url = `${G_SERVER_URL}/api/admins/model-management/version/${id}` return await postRequest(url, null, accessToken) } diff --git a/src/app/service/updateReq.ts b/src/app/service/updateReq.ts index ed75a830..5b9055ef 100644 --- a/src/app/service/updateReq.ts +++ b/src/app/service/updateReq.ts @@ -28,7 +28,6 @@ export const updateExp = async ( id: string, ) => { const url = `${SERVER_URL}/api/experiences/${id}` - console.log(url, '요청경로') return await patchRequest(url, experienceContent, accessToken) } From bd694695d8ab34e92972fb7455e924aa63ff86f3 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sat, 1 Jun 2024 17:22:17 +0900 Subject: [PATCH 12/17] =?UTF-8?q?:recycle:=20refactor:=20=ED=8F=AC?= =?UTF-8?q?=EB=A7=A4=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../board/containers/CommentContainer.tsx | 4 +++- .../components/board/containers/OtherUserNav.tsx | 2 +- .../board/containers/OtherUserPortfolio.tsx | 9 +++++++-- src/app/components/board/job/JobPost.tsx | 10 +++------- .../coverletter/AnalysisSatisfaction.tsx | 2 +- src/app/components/coverletter/CovletMain.tsx | 3 +-- src/app/components/coverletter/CovletSave.tsx | 2 +- .../components/experience/ExpInfoContainer.tsx | 12 ++++++------ src/app/components/mypage/MyCovletCardDetail.tsx | 16 ++++++++++++---- src/app/components/mypage/PortfolioContainer.tsx | 4 +++- 10 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/app/components/board/containers/CommentContainer.tsx b/src/app/components/board/containers/CommentContainer.tsx index acc1bbca..dd67b3ea 100644 --- a/src/app/components/board/containers/CommentContainer.tsx +++ b/src/app/components/board/containers/CommentContainer.tsx @@ -93,7 +93,9 @@ const CommentContainer = ({ postId, isLiked }: CommentContainerProps) => { isReply ? '대댓글을 입력하세요...' : '댓글을 입력하세요...' } onChange={(e) => setContent(e.target.value)} - onKeyDown={(e) => e.key === 'Enter' && LeaveComment &&LeaveComment()} + onKeyDown={(e) => + e.key === 'Enter' && LeaveComment && LeaveComment() + } value={content} >
diff --git a/src/app/components/board/containers/OtherUserNav.tsx b/src/app/components/board/containers/OtherUserNav.tsx index 5f112041..f0b7dafc 100644 --- a/src/app/components/board/containers/OtherUserNav.tsx +++ b/src/app/components/board/containers/OtherUserNav.tsx @@ -10,7 +10,7 @@ const OtherUserNav = ({ nickname, profile }: OtherUserNavProps) => { return (
-
+
{ setProfile(data.result.profile) - isExp ? setExpCards(data.result.experienceCardInfo.experienceCardItems) : setCovletCards(data.result.coverLetterInfo.coverLetterInfo) @@ -82,7 +81,13 @@ const OtherUserPortfolio = ({ username }: OtherUserPortfolioProps) => {
{covletCards.length > 0 ? ( covletCards.map((a) => ( - + )) ) : (
diff --git a/src/app/components/board/job/JobPost.tsx b/src/app/components/board/job/JobPost.tsx index ebb5f9a5..a1102d90 100644 --- a/src/app/components/board/job/JobPost.tsx +++ b/src/app/components/board/job/JobPost.tsx @@ -39,19 +39,15 @@ const JobPost = ({ data }: JobPostProps) => { {data.jobCategory}
- {data.title.length > 23 ? ( - <> - {data.title.slice(0, 23)}... - + {data.title.length > 23 ? ( + <>{data.title.slice(0, 23)}... ) : ( data.title )}
{data.content.length > 60 ? ( - <> - {data.content.slice(0, 60)}... - + <>{data.content.slice(0, 60)}... ) : ( data.content )} diff --git a/src/app/components/coverletter/AnalysisSatisfaction.tsx b/src/app/components/coverletter/AnalysisSatisfaction.tsx index a0196619..a9f395b6 100644 --- a/src/app/components/coverletter/AnalysisSatisfaction.tsx +++ b/src/app/components/coverletter/AnalysisSatisfaction.tsx @@ -48,7 +48,7 @@ const AnalysisSatisfaction = ({ analysis_id }: SatisfactionProps) => {
- AI 직무 역량 분석 결과에 대한 {' '} 나의 만족도는? + AI 직무 역량 분석 결과에 대한 나의 만족도는?
만족도 조사 diff --git a/src/app/components/coverletter/CovletMain.tsx b/src/app/components/coverletter/CovletMain.tsx index d9cf956a..3cc1b421 100644 --- a/src/app/components/coverletter/CovletMain.tsx +++ b/src/app/components/coverletter/CovletMain.tsx @@ -36,7 +36,6 @@ const CovletMain = ({ isEdit, id }: CovletFinishContainerProps) => { setTid(tid) - useEffect(() => { if (pg_token) { const getTid = async () => { @@ -366,7 +365,7 @@ const CovletMain = ({ isEdit, id }: CovletFinishContainerProps) => {
-
+
AI 자기소개서 피드백
@@ -270,7 +272,9 @@ const MyCovletCardDetail = ({ ) : null ) : null}
-
+
문항 @@ -286,7 +290,9 @@ const MyCovletCardDetail = ({
-
+
#{keyword1} @@ -452,7 +458,9 @@ const MyCovletCardDetail = ({
-
+
diff --git a/src/app/components/mypage/PortfolioContainer.tsx b/src/app/components/mypage/PortfolioContainer.tsx index 722c19fc..9cca5668 100644 --- a/src/app/components/mypage/PortfolioContainer.tsx +++ b/src/app/components/mypage/PortfolioContainer.tsx @@ -113,7 +113,9 @@ const PortfolioContainer = () => {
{covletCards?.length > 0 ? ( - covletCards.map((a) => ) + covletCards.map((a) => ( + + )) ) : (
From 83ab474d536f57ea0d2ab215a70cdcf5a6cfe7fd Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Jun 2024 14:50:26 +0900 Subject: [PATCH 13/17] =?UTF-8?q?:recycle:=20refactor:=20post=20get=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=EC=9C=BC=EB=A1=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/admin/model/detail/route.ts | 6 +++--- src/app/api/admin/model/version/route.ts | 4 ++-- src/app/api/board/detail/route.ts | 6 +++--- src/app/components/admin/model/ModelManage.tsx | 1 - .../components/admin/model/ModelManageInfo.tsx | 11 ++--------- .../board/containers/BoardDetailContainer.tsx | 6 ------ src/app/service/getRequests.ts | 18 ++++++++++++++++++ src/app/service/postRequests.ts | 18 ------------------ 8 files changed, 28 insertions(+), 42 deletions(-) diff --git a/src/app/api/admin/model/detail/route.ts b/src/app/api/admin/model/detail/route.ts index a49d7730..c121c0f3 100644 --- a/src/app/api/admin/model/detail/route.ts +++ b/src/app/api/admin/model/detail/route.ts @@ -1,12 +1,12 @@ -import { postmodelDetail } from '@/app/service/postRequests' +import { getModelDetail } from '@/app/service/getRequests' import { getCookie } from '@/app/utils/cookies' import { NextResponse } from 'next/server' -export async function POST(request: Request): Promise { +export async function GET(request: Request): Promise { const { searchParams } = new URL(request.url) const id = searchParams.get('id') || '' const accessToken = getCookie(request, 'accessToken') - const data = await postmodelDetail(accessToken, id).then((data) => data) + const data = await getModelDetail(accessToken, id).then((data) => data) return NextResponse.json(data) } diff --git a/src/app/api/admin/model/version/route.ts b/src/app/api/admin/model/version/route.ts index cb65f4e1..695cf358 100644 --- a/src/app/api/admin/model/version/route.ts +++ b/src/app/api/admin/model/version/route.ts @@ -1,8 +1,8 @@ -import { getModelList } from '@/app/service/postRequests' +import { getModelList } from '@/app/service/getRequests' import { getCookie } from '@/app/utils/cookies' import { NextResponse } from 'next/server' -export async function POST(request: Request) { +export async function GET(request: Request): Promise { const { searchParams } = new URL(request.url) const page = searchParams.get('page') || '' const accessToken = getCookie(request, 'accessToken') diff --git a/src/app/api/board/detail/route.ts b/src/app/api/board/detail/route.ts index 35e94aee..0ef758af 100644 --- a/src/app/api/board/detail/route.ts +++ b/src/app/api/board/detail/route.ts @@ -1,12 +1,12 @@ -import { postBoardDetail } from '@/app/service/postRequests' +import { getBoardDetail } from '@/app/service/getRequests' import { getCookie } from '@/app/utils/cookies' import { NextResponse } from 'next/server' -export async function POST(request: Request) { +export async function GET(request: Request):Promise { let accessToken = getCookie(request, 'accessToken') const { searchParams } = new URL(request.url) const id = searchParams.get('id') || '' - const data = await postBoardDetail(accessToken, id) + const data = await getBoardDetail(accessToken, id) return NextResponse.json(data) } diff --git a/src/app/components/admin/model/ModelManage.tsx b/src/app/components/admin/model/ModelManage.tsx index a3426baa..9babe7e7 100644 --- a/src/app/components/admin/model/ModelManage.tsx +++ b/src/app/components/admin/model/ModelManage.tsx @@ -21,7 +21,6 @@ const ModelManage = () => { const fetchData = async () => { const res = await fetch( `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/admin/model/version?page=${page - 1}`, - { method: 'POST' }, ) const resData = await res.json() diff --git a/src/app/components/admin/model/ModelManageInfo.tsx b/src/app/components/admin/model/ModelManageInfo.tsx index 30ad2f78..5df96277 100644 --- a/src/app/components/admin/model/ModelManageInfo.tsx +++ b/src/app/components/admin/model/ModelManageInfo.tsx @@ -19,17 +19,10 @@ const ModelManageInfo = (trainInfo: ModelManageInfoProps) => { const { isOpen, openModal, closeModal, handleModalClick } = useModal(false) const [detailData, setDetailData] = useState(null) - const postModelDetail = async () => { + const getModelDetail = async () => { openModal() - const requestOpt = { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - } const res = await fetch( `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/admin/model/detail?id=${modelId}`, - requestOpt, ) const resData = await res.json() setDetailData(resData.result) @@ -59,7 +52,7 @@ const ModelManageInfo = (trainInfo: ModelManageInfoProps) => {
{'배포'} diff --git a/src/app/components/board/containers/BoardDetailContainer.tsx b/src/app/components/board/containers/BoardDetailContainer.tsx index 6ab95e76..0494a336 100644 --- a/src/app/components/board/containers/BoardDetailContainer.tsx +++ b/src/app/components/board/containers/BoardDetailContainer.tsx @@ -48,12 +48,6 @@ const BoardDetailContainer = ({ nickname }: BoardDetailContainerProps) => { const fetchData = async () => { const response = await fetch( `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/board/detail?id=${selectedId}`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - }, ) const resData = await response.json() setData(resData.result.boardInfo) diff --git a/src/app/service/getRequests.ts b/src/app/service/getRequests.ts index 5761931b..a91a80cf 100644 --- a/src/app/service/getRequests.ts +++ b/src/app/service/getRequests.ts @@ -153,3 +153,21 @@ export const getComments = async (accessToken: string, id: string) => { const url = `${SERVER_URL}/api/board-comments/${id}?page=0` return await getRequest(url, accessToken) } + +export const getBoardDetail = async (accessToken: string, id: string) => { + const url = `${SERVER_URL}/api/boards/${id}` + return await getRequest(url, accessToken) +} + +export const getModelList = async (accessToken: string, page: string) => { + const url = + page !== '' + ? `${SERVER_URL}/api/admins/data-management/version?page=${page}` + : `${SERVER_URL}/api/admins/data-management/version` + return await getRequest(url, accessToken) +} + +export const getModelDetail = async (accessToken: string, id: string) => { + const url = `${SERVER_URL}/api/admins/data-management/version/${id}` + return await getRequest(url, accessToken) +} \ No newline at end of file diff --git a/src/app/service/postRequests.ts b/src/app/service/postRequests.ts index c3f41655..8c6933d2 100644 --- a/src/app/service/postRequests.ts +++ b/src/app/service/postRequests.ts @@ -84,11 +84,6 @@ export const postUsingPoint = async ( return await postRequest(url, point, accessToken) } -export const postBoardDetail = async (accessToken: string, id: string) => { - const url = `${SERVER_URL}/api/boards/${id}` - return await postRequest(url, null, accessToken) -} - export const postEmployment = async ( accessToken: string, boardData: PostEmployment, @@ -170,19 +165,6 @@ export const postAdditionalTrain = async (accessToken: string) => { return await postRequest(url, null, accessToken) } -export const getModelList = async (accessToken: string, page: string) => { - const url = - page !== '' - ? `${SERVER_URL}/api/admins/data-management/version?page=${page}` - : `${SERVER_URL}/api/admins/data-management/version` - return await postRequest(url, null, accessToken) -} - -export const postmodelDetail = async (accessToken: string, id: string) => { - const url = `${SERVER_URL}/api/admins/data-management/version/${id}` - return await postRequest(url, null, accessToken) -} - export const postLike = async (accessToken: string, id: string) => { const url = `${SERVER_URL}/api/board-likes/${id}` return await postRequest(url, null, accessToken) From 3ac925995412b33d544fcf6a79723529cbc99da8 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Jun 2024 18:30:35 +0900 Subject: [PATCH 14/17] =?UTF-8?q?:recycle:=20refactor:=20100=EC=9B=90=20?= =?UTF-8?q?=EC=B6=A9=EC=A0=84=EB=B6=88=EA=B0=80=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/points/ChargePoint.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/points/ChargePoint.tsx b/src/app/components/points/ChargePoint.tsx index 50183924..617aa568 100644 --- a/src/app/components/points/ChargePoint.tsx +++ b/src/app/components/points/ChargePoint.tsx @@ -24,7 +24,7 @@ const ChargePoint = ({ const router = useRouter() const [chargeP, setChargeP] = useState('') const [tid, setTid] = useRecoilState(tidState) - const isHundred = Number(chargeP) % 100 === 0 && Number(chargeP) > 100 + const isHundred = Number(chargeP) % 100 === 0 && Number(chargeP) >= 100 const connectPay = async () => { const SECRET_KEY = 'DEV0B0F086576B04B715B7404AA618D4C0B985A' From 7aa03f04d13c580c70987f7a73ff397479117140 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Jun 2024 19:06:30 +0900 Subject: [PATCH 15/17] =?UTF-8?q?:recycle:=20refactor:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/error.tsx | 14 +- src/app/components/mypage/MyExpCardDetail.tsx | 187 ------------------ 2 files changed, 7 insertions(+), 194 deletions(-) delete mode 100644 src/app/components/mypage/MyExpCardDetail.tsx diff --git a/src/app/(route)/error.tsx b/src/app/(route)/error.tsx index 265c58fc..8764beae 100644 --- a/src/app/(route)/error.tsx +++ b/src/app/(route)/error.tsx @@ -11,13 +11,13 @@ export default function ErrorPage({ }) { const [userInfo, setUser] = useState(null) const router = useRouter() - useEffect(() => { - document.cookie = - 'accessToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' - document.cookie = - 'refreshToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' - router.push('/login') - }, [error]) + // useEffect(() => { + // document.cookie = + // 'accessToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' + // document.cookie = + // 'refreshToken=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' + // router.push('/login') + // }, [error]) useEffect(() => { const fetchData = async () => { diff --git a/src/app/components/mypage/MyExpCardDetail.tsx b/src/app/components/mypage/MyExpCardDetail.tsx deleted file mode 100644 index b9b9dfa9..00000000 --- a/src/app/components/mypage/MyExpCardDetail.tsx +++ /dev/null @@ -1,187 +0,0 @@ -'use client' - -import { useRouter } from 'next/navigation' -import { useRecoilState } from 'recoil' -import { expData } from '../../recoil/experience' - -interface ExperienceCardDetail { - experienceId: number - title: string - startDate: string - endDate: string - experienceType: string - jobKeyword: onlyJobType - stack: string - task: string - motivation: string - detail: string - advance: string - closeModal: () => void - isGuest?: boolean -} - -const MyExpCardDetail = ({ - experienceId, - title, - startDate, - endDate, - experienceType, - jobKeyword, - stack, - task, - motivation, - detail, - advance, - closeModal, - isGuest, -}: ExperienceCardDetail) => { - const handleModalClick = ( - event: React.MouseEvent, - ) => { - event.stopPropagation() - } - - const router = useRouter() - const [experienceData, setExperienceData] = useRecoilState(expData) - - const onEditClick = () => { - setExperienceData({ - title, - startDate, - endDate, - experienceType, - task, - motivation, - detail, - advance, - stack, - jobKeyword, - expStacks: stack.split(' / '), - }) - - router.push(`/edit-experience/${experienceId}`) - } - - const deleteExp = async (experienceId: number) => { - try { - const res = await fetch( - `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/mypage/myExp/delete?experienceId=${experienceId}`, - { - method: 'DELETE', - }, - ) - - if (res.ok) { - window.location.reload() - } else { - const errorData = await res.json() - console.error('Error details:', errorData) - } - } catch (error) { - console.error('Network or other error:', error) - } - } - return ( -
-
-
-
-
-
-
-
- {jobKeyword} -
-
-
-
- {stack} -
-
-
-
-
- {experienceType} -
-
-
- {title} -
-
- {startDate}~{endDate} -
-
- X -
-
-
- 업무 사항 -
-
-
- {task} -
-
-
-
- 경험 동기 -
-
-
- {motivation} -
-
-
-
- 나의 활동 & 경험 내용 -
-
-
- {detail} -
-
- -
-
- 결과 및 성과 -
-
-
- {advance} -
-
-
- {isGuest ? ( -
- ) : ( -
-
- -
-
- -
-
- )} -
-
- ) -} - -export default MyExpCardDetail From fef2b535e6be34455e659137e63b9d6972f8a6fa Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Jun 2024 19:10:20 +0900 Subject: [PATCH 16/17] =?UTF-8?q?:recycle:=20refactor:=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=8A=A4=EC=99=80=EC=9D=B4=ED=8D=BC=20=EC=A0=9C?= =?UTF-8?q?=EC=9E=91=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/experience/ExpCardSwiper.tsx | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/app/components/experience/ExpCardSwiper.tsx diff --git a/src/app/components/experience/ExpCardSwiper.tsx b/src/app/components/experience/ExpCardSwiper.tsx new file mode 100644 index 00000000..4a55c441 --- /dev/null +++ b/src/app/components/experience/ExpCardSwiper.tsx @@ -0,0 +1,47 @@ +'use client' +import { Swiper, SwiperSlide } from 'swiper/react' + +import 'swiper/css' +import 'swiper/css/effect-coverflow' +import 'swiper/css/pagination' +import { Autoplay, EffectCoverflow, Pagination } from 'swiper/modules' + +interface ExpCardSwiperProps { + cardsArr: JSX.Element[] +} + +const ExpCardSwiper = ({ cardsArr }: ExpCardSwiperProps) => { + return ( + + {cardsArr.map((card, index) => ( + + {card} + + ))} + + ) +} + +export default ExpCardSwiper From d4b0fd88dfe0267ee07f85fbdefb5b5951d62f86 Mon Sep 17 00:00:00 2001 From: Minkyu0424 Date: Sun, 2 Jun 2024 19:11:11 +0900 Subject: [PATCH 17/17] =?UTF-8?q?:recycle:=20refactor:=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=ED=8F=AC=EB=A7=A4=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/board/detail/route.ts | 2 +- src/app/components/mypage/BoardCardDetail.tsx | 2 +- src/app/components/mypage/SavingCard.tsx | 54 ++++++++++--------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/app/api/board/detail/route.ts b/src/app/api/board/detail/route.ts index 0ef758af..def7de4f 100644 --- a/src/app/api/board/detail/route.ts +++ b/src/app/api/board/detail/route.ts @@ -2,7 +2,7 @@ import { getBoardDetail } from '@/app/service/getRequests' import { getCookie } from '@/app/utils/cookies' import { NextResponse } from 'next/server' -export async function GET(request: Request):Promise { +export async function GET(request: Request): Promise { let accessToken = getCookie(request, 'accessToken') const { searchParams } = new URL(request.url) const id = searchParams.get('id') || '' diff --git a/src/app/components/mypage/BoardCardDetail.tsx b/src/app/components/mypage/BoardCardDetail.tsx index 6d199939..88696317 100644 --- a/src/app/components/mypage/BoardCardDetail.tsx +++ b/src/app/components/mypage/BoardCardDetail.tsx @@ -40,7 +40,7 @@ const BoardCardDetail = ({ nickname, profile }: BoardDetailContainer) => { if (isSelected) { const fetchData = async () => { const response = await fetch( - `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/board/detail?id=${selectedId}` + `${process.env.NEXT_PUBLIC_NEXT_SERVER}/api/board/detail?id=${selectedId}`, ) const resData = await response.json() setData(resData.result.boardInfo) diff --git a/src/app/components/mypage/SavingCard.tsx b/src/app/components/mypage/SavingCard.tsx index dcf98af6..905fc11c 100644 --- a/src/app/components/mypage/SavingCard.tsx +++ b/src/app/components/mypage/SavingCard.tsx @@ -1,27 +1,31 @@ interface SavingCardProps { - createdAt: string - coverLetterId: number - point: number - totalPoint: number - } - - const SavingCard = ({ createdAt, coverLetterId, point, totalPoint }: SavingCardProps) => { - return ( -
-
- {createdAt} -
-
- {coverLetterId} -
-
- {point} -
-
- {totalPoint} -
+ createdAt: string + coverLetterId: number + point: number + totalPoint: number +} + +const SavingCard = ({ + createdAt, + coverLetterId, + point, + totalPoint, +}: SavingCardProps) => { + return ( +
+
+ {createdAt}
- ) - } - export default SavingCard - \ No newline at end of file +
+ {coverLetterId} +
+
+ {point} +
+
+ {totalPoint} +
+
+ ) +} +export default SavingCard