From 5431380bad75deed37201686796b24d8e6e34a97 Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sun, 18 Feb 2024 02:58:04 +0900 Subject: [PATCH 01/33] =?UTF-8?q?[Docs]:=20=EC=BA=98=EB=A6=B0=EB=8D=94,=20?= =?UTF-8?q?=EC=A7=80=EB=8F=84=20=EB=B9=BC=EA=B3=A0=20=EC=99=84=EB=A3=8C..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/home.js | 162 +------------- src/mocks/handlers/mate.js | 373 +++++++++++++++++++++++--------- src/mocks/handlers/profile.js | 24 ++ src/mocks/handlers/signature.js | 233 +++++++++++++++++--- 4 files changed, 499 insertions(+), 293 deletions(-) diff --git a/src/mocks/handlers/home.js b/src/mocks/handlers/home.js index bb87674f..74ac39d2 100644 --- a/src/mocks/handlers/home.js +++ b/src/mocks/handlers/home.js @@ -4,172 +4,12 @@ import { baseURL } from '@/apis/api'; import { API_URL } from '@/constants/path'; export const HomeHandlers = [ - //월별 일정 불러오기 (확정x) - http.get( - `${baseURL}${API_URL.LOAD_MONTHLY_SCHEDULE}`, - ({ request, params }) => { - const year = params.year; - const month = params.month; - - if (!year || !month) { - return new HttpResponse(null, { status: 404 }); - } else if (year && month) { - return HttpResponse.json({ - status: 200, - success: true, - message: '닉네임 수정 성공', - data: { - year: year, - month: month, - monthlyJourneys: [ - { - journeyId: 123, - journeyTitle: 'My Journey', - dateGroup: { - id: 1, - startDate: '2024-02-05', - endDate: '2024-02-06', - }, - schedules: [ - { - scheduleId: 1, - date: `${year}-${month}-11`, - title: 'Day 1 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 101, - content: - 'Detail for Day 1 Detail for Day 1 Detail for Day 1 Detail for Day 1 Detail for Day 1', - }, - { - detailScheduleId: 102, - content: - 'Detail for Day 12 Detail for Day 12 Detail for Day 12 Detail for Day 12 Detail for Day 1', - }, - ], - diary_written: true, - }, - { - scheduleId: 2, - date: `${year}-${month}-12`, - title: 'Day 2 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 102, - content: 'Detail for Day 2 Schedule', - }, - ], - diary_written: false, - }, - { - scheduleId: 3, - date: `${year}-${month}-13`, - title: 'Day 3 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 103, - content: 'Detail for Day 3 Schedule', - }, - ], - diary_written: false, - }, - ], - }, - { - journeyId: 124, - journeyTitle: 'My Journey', - dateGroup: { - id: 1, - startDate: '2024-02-08', - endDate: '2024-02-14', - }, - schedules: [ - { - scheduleId: 5, - date: `${year}-${month}-11`, - title: 'Day 1 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 101, - content: - 'Detail for Day 1 Detail for Day 1 Detail for Day 1 Detail for Day 1 Detail for Day 1', - }, - { - detailScheduleId: 102, - content: - 'Detail for Day 12 Detail for Day 12 Detail for Day 12 Detail for Day 12 Detail for Day 1', - }, - ], - diary_written: true, - }, - { - scheduleId: 6, - date: `${year}-${month}-12`, - title: 'Day 2 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 102, - content: 'Detail for Day 2 Schedule', - }, - ], - diary_written: false, - }, - { - scheduleId: 7, - date: `${year}-${month}-13`, - title: 'Day 3 Schedule', - location: { - name: 'Google Location', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 103, - content: 'Detail for Day 3 Schedule', - }, - ], - diary_written: false, - }, - ], - }, - ], - }, - }); - } - }, - ), //여정 저장하기 http.post(`${baseURL}${API_URL.SAVE_JOURNEY}`, ({ params, request }) => { return HttpResponse.json({ status: 200, success: true, - message: '여정 저장하기 성공', + message: '여정이 저장되었습니다', data: { id: 1, title: 'New Journey', diff --git a/src/mocks/handlers/mate.js b/src/mocks/handlers/mate.js index 7dbcf855..ae93d3fd 100644 --- a/src/mocks/handlers/mate.js +++ b/src/mocks/handlers/mate.js @@ -1,7 +1,7 @@ import { HttpResponse, http } from 'msw'; import { baseURL } from '@/apis/api'; -import { API_URL } from '@/constants/path'; +import { API_BASE, API_URL } from '@/constants/path'; export const MateHandlers = [ //메이트 검색하기 @@ -164,6 +164,61 @@ export const MateHandlers = [ }); }, ), + //메이트 탐색2 + http.get(`${baseURL}${API_URL.LOCATION_MATE}`, ({ request, params }) => { + const url = new URL(request.url); + const cursorId = parseInt(url.searchParams.get('cursor')) || 0; + const take = parseInt(url.searchParams.get('take')) || 0; + + return HttpResponse.json({ + timestamp: '2024-02-09T11:49:13.427Z', + code: 'OK', + success: true, + message: '장소 기반 메이트 추천 리스트 가져오기 성공', + data: { + location: '알베르', + userName: '샐리', + mateProfiles: [ + { + _id: 3, + mateName: '써니', + introduction: '안녕하세요 반가워요', + is_followed: false, + mateImage: + 'https://hereyou-cdn.kaaang.dev/signature/07f8c65c-5966-4b2e-9d96-08d5d084d013.png', + signatures: [ + { + _id: 22, + title: '강남역 근처 카페 추천', + image: + 'https://hereyou-cdn.kaaang.dev/signature/07f8c65c-5966-4b2e-9d96-08d5d084d013.png', + }, + { + _id: 22, + title: '강남역근처', + image: + 'https://hereyou-cdn.kaaang.dev/signature/07f8c65c-5966-4b2e-9d96-08d5d084d013.png', + }, + ], + }, + { + _id: 4, + mateName: '예니', + introduction: '안녕하세요 반가워요', + is_followed: false, + mateImage: + 'https://hereyou-cdn.kaaang.dev/signature/07f8c65c-5966-4b2e-9d96-08d5d084d013.png', + signatures: { + _id: 22, + title: '강남역 근처 카페 추천', + image: + 'https://hereyou-cdn.kaaang.dev/signature/07f8c65c-5966-4b2e-9d96-08d5d084d013.png', + }, + }, + ], + }, + }); + }), //팔로워 목록 불러오기 http.get(`${baseURL}${API_URL.GET_MATE_FOLLOWER}`, ({ request, params }) => { @@ -354,54 +409,63 @@ export const MateHandlers = [ } return HttpResponse.json({ - timestamp: '2024-02-08T12:15:07.069Z', + timestamp: '2024-02-12T07:35:57.786Z', code: 'OK', success: true, - message: '여행 규칙 불러오기 성공', - data: [ - { - id: 123, - mainTitle: '제주도 여행', - detailMembers: [ - { - id: 1234, - name: '김용민', - nickname: 'dydals3440', - introduction: '안녕하세요 안예원 입니다. 반가워요', - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - { - id: 12345, - name: '다인', - nickname: 'chakk', - introduction: '안녕하세요 안원 입니다. 반가워요', - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - { - id: 1235, - name: '예원', - nickname: 'yewon', - introduction: '안녕하세요 예원 입니다. 반가워요', - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - ], - rulePairs: [ - { - id: 123, - ruleTitle: '규칙 제목1', - ruleDetail: '세부 내용1', - }, - { - id: 124, - ruleTitle: '규칙 제목2', - ruleDetail: '세부 내용2', - }, - ], + message: '여행 규칙 상세 페이지 (게시글) 조회 성공', + data: { + id: '21', + mainTitle: '일본 여행', + rulePairs: [ + { + id: 40, + ruleTitle: '취침 시간 규칙', + ruleDetail: '12시엔 자기', + }, + { + id: 41, + ruleTitle: '기상 규칙', + ruleDetail: '7시 기상', + }, + ], + detailMembers: [ + { + id: 2, + name: 'Test2', + image: null, + }, + { + id: 3, + name: 'Test3', + image: null, + }, + { + id: 1, + name: 'Test1', + image: null, + }, + ], + comments: [ + { + id: 1234, + image: 'profile_img_url', + text: '완벽한 규칙이네요', + created: 1675275543, + }, + { + id: 124, + image: 'profile_img_url', + text: '완벽한 규칙이네요', + created: 1675275543, + }, + ], + metaToBack: { + total: 3, + take: 2, + cursor: 1, + hasNextData: true, }, - ], + }, }); }, ), @@ -558,72 +622,86 @@ export const MateHandlers = [ //여행 규칙 전체 리스트 http.get(`${baseURL}${API_URL.GET_TEAM_RULE_LIST}`, ({ request, params }) => { return HttpResponse.json({ - status: 200, + timestamp: '2024-02-10T15:33:53.125Z', + code: 'OK', success: true, - message: '참여 중인 여행 규칙 리스트 불러오기 성공', - data: { - rules: [ - { - id: 1, - memberCnt: 3, - title: '제주도 여행을 위한 규칙', - updated: 1675275543, - participants: [ - { - id: 345, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - { - id: 678, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - ], - }, - { - id: 2, - memberCnt: 3, - title: '제주도 여행을 위한 규칙', - updated: 1675275543, - participants: [ - { - id: 345, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - { - id: 678, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - ], - }, - { - id: 3, - memberCnt: 3, - title: '제주도 여행을 위한 규칙', - updated: 1675275543, - participants: [ - { - id: 345, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - { - id: 678, - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - ], - }, - ], - }, + message: '여행 규칙 전체 리스트 조회 성공', + data: [ + { + id: '20', + title: '일본 여행', + updated: '2024-02-09T03:37:32.711Z', + memberCnt: 3, + memberPairs: [ + { + id: 3, + name: 'Test3', + image: null, + }, + { + id: 2, + name: 'Test2', + image: null, + }, + { + id: 1, + name: 'Test1', + image: null, + }, + ], + }, + { + id: '21', + title: '일본 여행', + updated: '2024-02-09T04:47:27.972Z', + memberCnt: 3, + memberPairs: [ + { + id: 2, + name: 'Test2', + image: null, + }, + { + id: 3, + name: 'Test3', + image: null, + }, + { + id: 1, + name: 'Test1', + image: null, + }, + ], + }, + { + id: '31', + title: '중국 여행', + updated: '2024-02-09T13:18:30.953Z', + memberCnt: 3, + memberPairs: [ + { + id: 2, + name: 'Test2', + image: null, + }, + { + id: 3, + name: 'Test3', + image: null, + }, + { + id: 1, + name: 'Test1', + image: null, + }, + ], + }, + ], }); }), // 여행 규칙 참여에서 나가기 - http.delete(`${API_URL.EXIT_TEAM_RULE}`, ({ request, params }) => { + http.delete(`${API_URL.EXIT_TEAM_RULE}/:ruleId`, ({ request, params }) => { const ruleId = params.ruleId; if (!ruleId) { @@ -636,4 +714,85 @@ export const MateHandlers = [ message: '여행 규칙에서 나가기 성공', }); }), + //메이트 프로필 정보 + http.get( + `${baseURL}${API_URL.MATE_PROFILE_SEARCH}/:mateId`, + ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-10T17:27:55.001Z', + code: 'OK', + success: true, + message: '유저 프로필 정보 가져오기 성공', + data: { + _id: 1, + nickname: '여행의 이유', + introduction: '졸리당', + image: null, + is_followed: true, + following: 1, + follower: 2, + signatures: 28, + isQuit: false, + }, + }); + }, + ), + + //메이트 시그니처 리스트 + http.get( + `${baseURL}${API_URL.MATE_PROFILE_SEARCH}/signature/:mateId`, + ({ request, params }) => { + const url = new URL(request.url); + const take = parseInt(url.searchParams.get('take')) || 5; + const cursorId = parseInt(url.searchParams.get('cursorId')) || 0; + if (!cursorId) { + return new HttpResponse(null, { status: 404 }); + } else { + return HttpResponse.json({ + timestamp: '2024-02-10T19:54:19.895Z', + code: 'OK', + success: true, + message: '메이트의 시그니처 가져오기 성공', + data: { + data: [ + { + _id: 27, + title: '알베르 테스트 유저5', + liked: 0, + image: + 'https://hereyou-cdn.kaaang.dev/signature/91a3d721-0998-44e6-91a0-843c00f3ab1b.png', + }, + { + _id: 26, + title: '알베르 테스트 유저5', + liked: 0, + image: + 'https://hereyou-cdn.kaaang.dev/signature/d5956637-c404-4985-8a12-764455ce6cad.png', + }, + { + _id: 25, + title: '알베르 테스트 유저5', + liked: 0, + image: + 'https://hereyou-cdn.kaaang.dev/signature/300492d8-34ec-44f2-9fff-2de15686ad75.png', + }, + { + _id: 24, + title: '알베르 테스트 유저5', + liked: 0, + image: + 'https://hereyou-cdn.kaaang.dev/signature/c663dc21-3b0e-4902-aa11-b90d91a12787.png', + }, + ], + meta: { + take: '5', + total: 4, + hasNextData: false, + cursor: null, + }, + }, + }); + } + }, + ), ]; diff --git a/src/mocks/handlers/profile.js b/src/mocks/handlers/profile.js index 2885a90b..b644ee45 100644 --- a/src/mocks/handlers/profile.js +++ b/src/mocks/handlers/profile.js @@ -68,11 +68,35 @@ export const ProfileHandlers = [ id: 2, type: 'COMMENT', content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', + itemId: 10, + isRead: false, + created: '2024-02-11T14:52:14.240Z', }, { id: 3, type: 'INVITE', content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', + itemId: 10, + isRead: false, + created: '2024-02-11T14:52:14.240Z', + }, + ], + }); + }), + // 읽지 않은 알림의 개수 조회 + http.get(`${baseURL}${API_URL.NOTIFICATION}/unread`, () => { + return HttpResponse.json({ + status: 200, + success: true, + message: '알림 조회 성공', + data: [ + { + id: 1, + type: 'LIKE', + content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', + itemId: 10, + isRead: false, + created: '2024-02-11T14:52:14.240Z', }, ], }); diff --git a/src/mocks/handlers/signature.js b/src/mocks/handlers/signature.js index b4e4b178..801180fa 100644 --- a/src/mocks/handlers/signature.js +++ b/src/mocks/handlers/signature.js @@ -8,22 +8,21 @@ export const SignatureHandlers = [ http.get(`${baseURL}${API_URL.GET_MY_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ status: 200, + code: 'OK', success: true, - message: '내 시그니처 조회 성공', + message: '내 시그니처 가져오기 성공', data: [ { - id: '01', - title: '시그니처 제목1', - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', + id: 1, + title: '호주와 겨룬 8강전 직관 후기', + date: '2024-02-03T08:03:22.000Z', + image: null, }, { - id: '02', - title: '시그니처 제목2', - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', + id: 2, + title: '강남역 근처 카페 모음', + date: '2024-02-03T08:14:40.000Z', + image: null, }, ], }); @@ -74,7 +73,7 @@ export const SignatureHandlers = [ return HttpResponse.json({ status: 200, success: true, - message: '시그니처 조회 성공', + message: '시그니처 상세보기 성공: 내 시그니처', data: { author: { _id: 2, @@ -126,25 +125,28 @@ export const SignatureHandlers = [ `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ - title: '새로운 시그니처 제목', + title: '신사역 근처 카페 모음', pages: [ { - content: '오늘은 호수 공원을 산책했습니다 어쩌구', - location: '광교 호수 공원', + _id: 20, + content: '공간이 매우 넓고 나무가 많아서 숲에 온 것 같은 느낌! ', + location: '수저어어어어어어어어엉', page: 1, image: 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', }, { - content: '저는 원래 호수 산책을 참 좋아하는데요 어쩌구', - location: '동백 호수 공원', + _id: 21, + content: '베라 싫음 ', + location: '베스킨라빈스', page: 2, image: 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', }, { - content: '오늘은 호수 공원을 산책했습니다 어쩌구', - location: '광교 호수 공원', + _id: 22, + content: '보드게임 싫음 ', + location: '레드버튼', page: 3, image: 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', @@ -165,9 +167,11 @@ export const SignatureHandlers = [ `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ - status: 204, + timestamp: '2024-02-05T07:40:21.691Z', + code: 'OK', success: true, - message: '시그니처 삭제하기 성공', + message: '시그니처 삭제 성공', + data: null, }); }, ), @@ -186,8 +190,187 @@ export const SignatureHandlers = [ }); }), - //시그니처_시그니처 좋아요한 사용자 목록 (API명세서 미완성) - // http.get(`${baseURL}${API_URL.LIKE_SIGNATURE}`, ({ request, params }) => { - // return HttpResponse.json(); - // }), + // 시그니처_시그니처 좋아요한 사용자 목록 + http.get(`${baseURL}${API_URL.LIKE_SIGNATURE}`, ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-05T15:03:14.672Z', + code: 'OK', + success: true, + message: '시그니처 좋아요 목록 불러오기 성공', + data: { + liked: 3, + profiles: [ + { + _id: 1, + image: 'imagekey1', + introduction: '사용자 소개', + nickname: '완두콩', + is_followed: null, + }, + { + _id: 2, + image: 'imagekey2', + introduction: '사용자 소개', + nickname: '강낭콩', + is_followed: false, + }, + { + _id: 3, + image: 'imagekey3', + introduction: '사용자 소개', + nickname: '검은콩', + is_followed: false, + }, + ], + }, + }); + }), + //시그니처_시그니처 댓글 작성하기 + http.post( + `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}/comment`, + ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-12T18:55:52.393Z', + code: 'CREATED', + success: true, + message: '시그니처 댓글 생성 성공', + data: 2, + }); + }, + ), + //시그니처_시그니처 답글 작성하기 + http.post( + `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}/comment/:parentId`, + ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-12T18:55:52.393Z', + code: 'CREATED', + success: true, + message: '시그니처 답글 생성 성공', + data: 2, + }); + }, + ), + //시그니처_시그니처 댓글/답글 수정하기 + http.patch( + `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}/comment/:commentId`, + ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-13T09:39:40.316Z', + code: 'OK', + success: true, + message: '시그니처 댓글 수정하기 성공', + data: 2, + }); + }, + ), + //시그니처_시그니처 댓글/답글 삭제하기 + http.delete( + `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}/comment/:commentId`, + ({ request, params }) => { + return HttpResponse.json({ + timestamp: '2024-02-13T18:14:31.531Z', + code: 'OK', + success: true, + message: '시그니처 댓글 삭제하기 성공', + data: '1', + }); + }, + ), + // 시그니처_시그니처 댓글/답글 불러오기 + http.get( + `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}/comment`, + + ({ request, params }) => { + const url = new URL(request.url); + const take = parseInt(url.searchParams.get('take')) || 5; + const cursorId = parseInt(url.searchParams.get('cursorId')) || 0; + if (!cursorId) { + return new HttpResponse(null, { status: 404 }); + } else { + return HttpResponse.json({ + timestamp: '2024-02-12T18:21:21.636Z', + code: 'OK', + success: true, + message: '시그니처 댓글 가져오기 성공', + data: { + data: [ + { + _id: 2, + content: '우와', + parentId: 2, // (parentId == _id) 이므로 해당 댓글이 부모 댓글 + writer: { + _id: 3, + name: '고구마', + is_writer: true, // 현재 로그인한 회원(id=4)은 작성자 본인 + image: null, + }, + date: '2024.02.13', + is_edited: false, // 댓글 수정된적 없음 + }, + { + _id: 3, + content: '우와 답글1', + parentId: 2, // (parentId != _id) 이므로 해당 댓글은 답글 + writer: { + _id: 3, + name: '고구마', + is_writer: true, + image: null, + }, + date: '2024.02.13', + is_edited: false, + }, + { + _id: 5, + content: '우와 답글2', + parentId: 2, + writer: { + _id: 3, + name: '고구마', + is_writer: true, + image: null, + }, + date: '2024.02.13', + is_edited: false, + }, + { + _id: 7, + content: '답글입니다', + parentId: 2, + writer: { + _id: 4, + name: '감자', // 로그인한 사용자(id=4)와 작성자가 일치하지 않음 + is_writer: false, // 그러므로 is_writer는 false + image: null, + }, + date: '2024.02.13', + is_edited: false, + }, // 여기까지가 부모 댓글 아이디가 2인 댓,답글들 + { + // 이제 다음 부모 댓글,답글들이 출력됨 + _id: 4, + content: '재밌네요!', + parentId: 4, + writer: { + _id: 3, + name: '고구마', + is_writer: true, + image: null, + }, + date: '2024.02.13', + is_edited: false, + }, + ], + meta: { + take: '5', + total: 6, + hasNextData: true, + cursor: 4, + }, + }, + }); + } + }, + ), ]; From d8aff73470a281df2555f8c2baed0e96a0692626 Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sun, 18 Feb 2024 04:32:19 +0900 Subject: [PATCH 02/33] =?UTF-8?q?[Docs]:=EC=97=AC=ED=96=89=EA=B7=9C?= =?UTF-8?q?=EC=B9=99=20=EB=B9=BC=EA=B3=A0=20=EB=A9=94=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/mate.js | 47 ++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/mocks/handlers/mate.js b/src/mocks/handlers/mate.js index ae93d3fd..043a6c59 100644 --- a/src/mocks/handlers/mate.js +++ b/src/mocks/handlers/mate.js @@ -5,7 +5,7 @@ import { API_BASE, API_URL } from '@/constants/path'; export const MateHandlers = [ //메이트 검색하기 - http.get(`${baseURL}${API_URL.SEARCH_MATE}`, ({ request, params }) => { + http.get(`${baseURL}${API_URL.FOLLOW_MATE}/search`, ({ request, params }) => { const url = new URL(request.url); const searchTerm = url.searchParams.get('searchTerm'); const cursor = url.searchParams.get('cursor'); @@ -13,9 +13,7 @@ export const MateHandlers = [ if (!searchTerm) { return new HttpResponse(null, { status: 404 }); - } - - if (searchTerm === 'ahnyewon') { + } else { return HttpResponse.json({ status: 200, success: true, @@ -68,8 +66,8 @@ export const MateHandlers = [ }), //메이트 팔로우 - http.post( - `${baseURL}${API_URL.FOLLOW_MATE}/:userId`, + http.patch( + `${baseURL}${API_URL.FOLLOW_MATE}/:followingId`, ({ request, params }) => { const userId = params.userId; @@ -220,62 +218,61 @@ export const MateHandlers = [ }); }), - //팔로워 목록 불러오기 - http.get(`${baseURL}${API_URL.GET_MATE_FOLLOWER}`, ({ request, params }) => { + //팔로잉 목록 불러오기 + http.get(`${baseURL}${API_URL.GET_MATE_FOLLOW}`, ({ request, params }) => { return HttpResponse.json({ status: 200, success: true, - message: '팔로워 리스트 불러오기 성공', + message: '팔로잉 리스트 불러오기 성공', data: { mates: [ { _id: 1, - name: '안예원', + name: '팔로잉_안예원', nickname: 'ahnyewon', - introduction: '안녕하세요 안예원 입니다. 반가워요', + bio: '안녕하세요 안예원입니다. 반가워요', image: - 'https://plus.unsplash.com/premium_photo-1671478394583-3d91fd9c7ca5?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxN3x8fGVufDB8fHx8fA%3D%3D', + 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', followId: 123, }, { _id: 2, name: '안예', nickname: 'ahnyw', - introduction: '안녕하세요 안예 입니다. 반가워요', + bio: '안녕하세요 안예입니다. 반가워요', image: - 'https://plus.unsplash.com/premium_photo-1671478394583-3d91fd9c7ca5?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxN3x8fGVufDB8fHx8fA%3D%3D', + 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', followId: 'null', }, ], }, }); }), - - //팔로잉 목록 불러오기 - http.get(`${baseURL}${API_URL.GET_MATE_FOLLOWING}`, ({ request, params }) => { + //팔로워 목록 불러오기 + http.get(`${baseURL}${API_URL.GET_MATE_FOLLOWER}`, ({ request, params }) => { return HttpResponse.json({ status: 200, success: true, - message: '팔로잉 리스트 불러오기 성공', + message: '팔로워 리스트 불러오기 성공', data: { mates: [ { _id: 1, - name: '팔로잉_안예원', + name: '안예원', nickname: 'ahnyewon', - bio: '안녕하세요 안예원입니다. 반가워요', + introduction: '안녕하세요 안예원 입니다. 반가워요', image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - is_following: true, + 'https://plus.unsplash.com/premium_photo-1671478394583-3d91fd9c7ca5?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxN3x8fGVufDB8fHx8fA%3D%3D', + followId: 123, }, { _id: 2, name: '안예', nickname: 'ahnyw', - bio: '안녕하세요 안예입니다. 반가워요', + introduction: '안녕하세요 안예 입니다. 반가워요', image: - 'https://images.unsplash.com/photo-1671920090611-9a40303b52cb?q=80&w=1965&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - is_following: false, + 'https://plus.unsplash.com/premium_photo-1671478394583-3d91fd9c7ca5?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwxN3x8fGVufDB8fHx8fA%3D%3D', + followId: 'null', }, ], }, From bb27e054da7d0b790493c8df9cfa7f31422d912b Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sun, 18 Feb 2024 16:09:49 +0900 Subject: [PATCH 03/33] =?UTF-8?q?[Docs]:=20=EC=9D=BC=EC=A0=95=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EB=8A=94=20=EC=AA=BD=20=EB=B9=BC=EA=B3=A0=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/schedules/Schedules.jsx | 1 + src/constants/path.js | 1 + src/mocks/handlers/home.js | 239 +++++-------------------- 3 files changed, 50 insertions(+), 191 deletions(-) diff --git a/src/components/schedules/Schedules.jsx b/src/components/schedules/Schedules.jsx index 881b1894..93d0bae4 100644 --- a/src/components/schedules/Schedules.jsx +++ b/src/components/schedules/Schedules.jsx @@ -31,6 +31,7 @@ const Schedules = ({ data, endDate, refetch }) => { const formattedEndDate = format(newDate, 'yyyy-MM-dd'); const lastPlan = date === formattedEndDate ? true : false; + console.log('안녕'); const handleOnToggle = () => { setIsToggle(!isToggle); }; diff --git a/src/constants/path.js b/src/constants/path.js index a2c68531..5bc7b4ce 100644 --- a/src/constants/path.js +++ b/src/constants/path.js @@ -102,6 +102,7 @@ const API_URL = { GET_JOURNEY_MAP: `/api/${VERSION}/${API_BASE.MAP}/get-journey/:journeyId`, GET_DIARIES_MAP: `/api/${VERSION}/${API_BASE.MAP}/get-diaries/:journeyId`, GET_DETAIL_JOURNEY_MAP: `/api/${VERSION}/${API_BASE.MAP}/get-schedules/:journeyId`, + GET_MONTHLY_LIST_SCHEDULE: `/api/${VERSION}/${API_BASE.MAP}/get-monthly-schedule`, // SIGNATURE SEARCH_SIGNATURE: `/api/${VERSION}/${API_BASE.SEARCH}`, // 검색탭 메인화면 GET_MY_SIGNATURE: `/api/${VERSION}/${API_BASE.SIGNATURE}`, diff --git a/src/mocks/handlers/home.js b/src/mocks/handlers/home.js index 74ac39d2..bcea40e1 100644 --- a/src/mocks/handlers/home.js +++ b/src/mocks/handlers/home.js @@ -67,143 +67,59 @@ export const HomeHandlers = [ }); }), //일정 불러오기 (커서 기반) -> 확정 안됨 - http.get(`${baseURL}${API_URL.GET_SCHEDULE}`, async ({ request, params }) => { - const url = new URL(request.url); - const journeyId = params.journeyId; - const cursor = parseInt(url.searchParams.get('cursor')) || 0; - if (!journeyId) { - return new HttpResponse(null, { status: 404 }); - } else if (journeyId) { - await delay(3000); + http.get( + `${baseURL}${API_URL.GET_MONTHLY_LIST_SCHEDULE}/:data`, + async ({ request, params }) => { + const url = new URL(request.url); + return HttpResponse.json({ - status: 200, - success: true, - message: '일정 불러오기 성공', - data: [ - { - scheduleId: cursor + 1, - journeyId: journeyId, - title: 'Exploration', - date: '2024-01-11', - location: { - name: 'Googleplex', - latitude: 37.422, - longitude: -122.0841, - }, - detailSchedules: [ - { - detailScheduleId: 1, - content: 'Morning exploration', - isDone: false, - }, - { - detailScheduleId: 2, - content: 'Afternoon adventure', - isDone: true, - }, - ], - diary_written: true, - }, - { - scheduleId: cursor + 2, - journeyId: journeyId, - title: 'Relaxation', - date: '2024-01-12', - location: { - name: 'Sunny Beach', - latitude: 36.7783, - longitude: -119.4179, - }, - detailSchedules: [ - { - detailScheduleId: 3, - content: 'Beach time', - isDone: false, - }, - { - detailScheduleId: 4, - content: 'Sunset watching', - isDone: true, - }, - ], - diary_written: false, - }, - { - scheduleId: cursor + 3, - journeyId: journeyId, - title: 'City Tour', - date: '2024-01-13', - location: { - name: 'City Center', - latitude: 37.7749, - longitude: -122.4194, + data: { + success: true, + code: 200, + message: '일정를 불러오는데 성공했습니다.', + data: { + journeyInfo: { + userId: 1, + journeyId: 6, + startDate: '2024-02-01', + endDate: '2024-02-15', }, - detailSchedules: [ + paginatedSchedules: [ { - detailScheduleId: 5, - content: 'Visit landmarks', - isDone: false, - }, - { - detailScheduleId: 6, - content: 'Try local cuisine', - isDone: false, + scheduleId: 17, + title: '2월 24일 일정', + date: '2024-02-01', + location: [ + { + locationId: 3, + name: '서울', + latitude: '11.000000', + longitude: '11.000000', + }, + ], + detailSchedules: [ + [ + { + id: 2, + content: null, + isDone: false, + }, + ], + ], + diary: [true], }, ], - diary_written: false, - }, - { - scheduleId: cursor + 4, - journeyId: journeyId, - title: 'City Tour', - date: '2024-01-13', - location: { - name: 'City Center', - latitude: 37.7749, - longitude: -122.4194, + meta: { + take: '1', + total: 15, + hasNextData: true, + cursor: 1, }, - detailSchedules: [ - { - detailScheduleId: 5, - content: 'Visit landmarks', - isDone: false, - }, - { - detailScheduleId: 6, - content: 'Try local cuisine', - isDone: false, - }, - ], - diary_written: false, }, - { - scheduleId: cursor + 5, - journeyId: journeyId, - title: 'City Tour', - date: '2024-01-13', - location: { - name: 'City Center', - latitude: 37.7749, - longitude: -122.4194, - }, - detailSchedules: [ - { - detailScheduleId: 5, - content: 'Visit landmarks', - isDone: false, - }, - { - detailScheduleId: 6, - content: 'Try local cuisine', - isDone: false, - }, - ], - diary_written: false, - }, - ], + }, }); - } - }), + }, + ), //세부 일정 추가하기 http.post( `${baseURL}${API_URL.CREATE_DETAIL_SCHEDULE}`, @@ -458,66 +374,6 @@ export const HomeHandlers = [ 'https://images.unsplash.com/photo-1682687219570-4c596363fd96?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwyMXx8fGVufDB8fHx8fA%3D%3D', }, }, - { - journeyId: journeyId, - date: '2022-03-21', - diary: { - id: 2, - title: '일지', - place: '내 집', - weather: 'SUNNY', - mood: 'HAPPY', - content: '5번째 일지를 작성했습니다...', - created: '2024-02-06T20:07:47.266Z', - updated: '2024-02-06T20:07:47.266Z', - deleted: null, - }, - diaryImage: { - id: 2, - imageUrl: - 'https://images.unsplash.com/photo-1682687219570-4c596363fd96?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwyMXx8fGVufDB8fHx8fA%3D%3D', - }, - }, - { - journeyId: journeyId, - date: '2022-03-22', - diary: { - id: 3, - title: '일지', - place: '내 집', - weather: 'SUNNY', - mood: 'HAPPY', - content: '5번째 일지를 작성했습니다...', - created: '2024-02-06T20:07:47.266Z', - updated: '2024-02-06T20:07:47.266Z', - deleted: null, - }, - diaryImage: { - id: 3, - imageUrl: - 'https://images.unsplash.com/photo-1682687219570-4c596363fd96?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwyMXx8fGVufDB8fHx8fA%3D%3D', - }, - }, - { - journeyId: journeyId, - date: '2022-03-23', - diary: { - id: 4, - title: '일지', - place: '내 집', - weather: 'SUNNY', - mood: 'HAPPY', - content: '5번째 일지를 작성했습니다...', - created: '2024-02-06T20:07:47.266Z', - updated: '2024-02-06T20:07:47.266Z', - deleted: null, - }, - diaryImage: { - id: 4, - imageUrl: - 'https://images.unsplash.com/photo-1682687219570-4c596363fd96?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwyMXx8fGVufDB8fHx8fA%3D%3D', - }, - }, ], }); } @@ -593,9 +449,10 @@ export const HomeHandlers = [ // 전체 일지 불러오기 (마이페이지) http.get(`${baseURL}${API_URL.GET_ALL_DIARY}`, ({ params, request }) => { return HttpResponse.json({ - status: 200, + timestamp: '2024-02-11T16:13:33.881Z', + code: 'OK', success: true, - message: '지도에서 일지 불러오기 성공', + message: '일지 목록 조회 성공', data: { diaries: [ { From 456bc8f88f331a970dd9098346d726989a1acb36 Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sun, 18 Feb 2024 16:14:05 +0900 Subject: [PATCH 04/33] =?UTF-8?q?[Feat]:=ED=83=90=EC=83=89=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=8F=84=20msw=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/explore.js | 162 ++++++++++------------------------ 1 file changed, 48 insertions(+), 114 deletions(-) diff --git a/src/mocks/handlers/explore.js b/src/mocks/handlers/explore.js index 3a3fd195..de63d0b9 100644 --- a/src/mocks/handlers/explore.js +++ b/src/mocks/handlers/explore.js @@ -6,138 +6,72 @@ import { baseURL } from '@/apis/api'; import { API_URL } from '@/constants/path'; export const ExploreHandlers = [ - // 탐색탭_메인 화면 - http.get(`${baseURL}${API_URL.SEARCH_SIGNATURE}`, ({ request, params }) => { - const url = new URL(request.url); - const search = url.searchParams.get('search'); - if (search) { + // 탐색탭_핫 시그니처 + http.get( + `${baseURL}${API_URL.SEARCH_SIGNATURE}/hot`, + ({ request, params }) => { return HttpResponse.json({ - status: 200, + timestamp: '2024-02-05T20:12:21.562Z', + code: 'OK', success: true, - message: `탑색탭 메인 ${search} 불러오기 성공`, + message: '탐색탭 메인 화면 가져오기 성공', data: { - hot: [ + covers: [ { - _id: 3, - title: `${search}`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: `${search}`, - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, + _id: 5, + title: '강남역 근처 카페 모음', + liked: 0, + userName: '써니', + date: '2024.02.06', + image: null, + userImage: 'imagekey1', }, { - _id: 4, - title: `${search} 시그니처 제목2`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: `${search}`, - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - }, - ], - new: [ - { - _id: 1, - title: `${search} 시그니처 제목3`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: `${search}`, - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - }, - { - _id: 2, - title: `${search} 시그니처 제목4`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: `${search}`, - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, + _id: 5, + title: '강남역 근처 카페 모음', + liked: 0, + userName: '써니', + date: '2024.02.06', + image: null, + userImage: 'imagekey1', }, ], }, }); - } else { + }, + ), + // 탐색탭_최신 시그니처 + http.get( + `${baseURL}${API_URL.SEARCH_SIGNATURE}/new`, + ({ request, params }) => { return HttpResponse.json({ - status: 200, + timestamp: '2024-02-05T20:12:21.562Z', + code: 'OK', success: true, - message: `탑색탭 메인 전체 불러오기 성공`, + message: '탐색탭 메인 화면 가져오기 성공', data: { - hot: [ - { - _id: 3, - title: `전체 시그니처 제목1`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: '닉네임', - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - }, - { - _id: 4, - title: `전체 시그니처 제목2`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: '닉네임', - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, - }, - ], - new: [ + covers: [ { - _id: 1, - title: `전체 시그니처 제목3`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: '닉네임', - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, + _id: 5, + title: '강남역 근처 카페 모음', + liked: 0, + userName: '써니', + date: '2024.02.06', + image: null, + userImage: 'imagekey1', }, { - _id: 2, - title: `전체 시그니처 제목4`, - date: '24/01/19', - image: - 'https://images.unsplash.com/photo-1682686581498-5e85c7228119?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - like: 5, - user: { - name: '닉네임', - image: - 'https://plus.unsplash.com/premium_photo-1705352059948-e5512efca860?q=80&w=2574&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D', - }, + _id: 5, + title: '강남역 근처 카페 모음', + liked: 0, + userName: '써니', + date: '2024.02.06', + image: null, + userImage: 'imagekey1', }, ], }, }); - } - }), + }, + ), ]; From 173294c9e380c95e22f7d1c01b9b55d88ae50cd9 Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sun, 18 Feb 2024 17:22:50 +0900 Subject: [PATCH 05/33] =?UTF-8?q?[Docs]:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=A4=84=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/schedules/Schedules.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/schedules/Schedules.jsx b/src/components/schedules/Schedules.jsx index 93d0bae4..881b1894 100644 --- a/src/components/schedules/Schedules.jsx +++ b/src/components/schedules/Schedules.jsx @@ -31,7 +31,6 @@ const Schedules = ({ data, endDate, refetch }) => { const formattedEndDate = format(newDate, 'yyyy-MM-dd'); const lastPlan = date === formattedEndDate ? true : false; - console.log('안녕'); const handleOnToggle = () => { setIsToggle(!isToggle); }; From ef5f8eddbab373267c0e3144aafaffe247aba879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 02:54:57 +0900 Subject: [PATCH 06/33] feat: main.yml --- .github/workflows/main.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b60446a..a64900fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,15 +13,18 @@ jobs: - name: Check Node v run: node -v - - name: .env setting + - name: create env file + working-directory: ./ run: | + pwd touch .env - echo "VITE_NODE_ENV=${{ secrets.VITE_NODE_ENV }}" > .env - echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > .env - echo "VITE_GOOGLE_MAP_API=${{ secrets.VITE_GOOGLE_MAP_API }}" > .env - echo "VITE_GOOGLE_AUTH_CLIENT_ID=${{ secrets.VITE_GOOGLE_AUTH_CLIENT_ID }}" > .env - echo "VITE_KAKAO_REST_API_KEAY=${{ secrets.VITE_KAKAO_REST_API_KEAY }}" > .env - echo "VITE_REDIRECT_URI=${{ secrets.VITE_REDIRECT_URI }}" > .env + echo "VITE_NODE_ENV=${{ secrets.VITE_NODE_ENV }}" >> .env + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" >> .env + echo "VITE_GOOGLE_MAP_API=${{ secrets.VITE_GOOGLE_MAP_API }}" >> .env + echo "VITE_GOOGLE_AUTH_CLIENT_ID=${{ secrets.VITE_GOOGLE_AUTH_CLIENT_ID }}" >> .env + echo "VITE_KAKAO_REST_API_KEAY=${{ secrets.VITE_KAKAO_REST_API_KEAY }}" >> .env + echo "VITE_REDIRECT_URI=${{ secrets.VITE_REDIRECT_URI }}" >> .env + cat .env - name: Install dependencies run: yarn From 46d64a96e7111209521eeefead687f9ce10d4a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:08:16 +0900 Subject: [PATCH 07/33] =?UTF-8?q?feat:=20main.yml=20AWS=20S3=20CI/CD=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 7 +++++-- src/pages/main/MainPage.jsx | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a64900fe..e48fc463 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: - name: Generate build run: yarn run build - - name: Deploy + - name: Deploy to S3 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -50,4 +50,7 @@ jobs: VITE_KAKAO_REST_API_KEAY: ${{ secrets.VITE_KAKAO_REST_API_KEAY }} VITE_REDIRECT_URI: ${{ secrets.VITE_REDIRECT_URI }} AWS_REGION: ${{ secrets.AWS_REGION }} - run: aws s3 cp --recursive --region ap-northeast-2 dist s3://here---you + run: aws s3 cp --recursive --region ap-northeast-2 dist s3://${{ secrets.AWS_BUCKET_NAME }} + + - name: Invaildate CloudFront Cache + run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} —paths "/*" diff --git a/src/pages/main/MainPage.jsx b/src/pages/main/MainPage.jsx index a91b5e75..5d1c66e0 100644 --- a/src/pages/main/MainPage.jsx +++ b/src/pages/main/MainPage.jsx @@ -15,6 +15,7 @@ export default function MainPage() { +
야호!
From ab36318563a9c0d5a177b63f8f1707091ea10b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:12:42 +0900 Subject: [PATCH 08/33] =?UTF-8?q?feat:=20main.yml=20AWS=20S3=20CI/CD=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e48fc463..fc1abd2d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,4 +53,4 @@ jobs: run: aws s3 cp --recursive --region ap-northeast-2 dist s3://${{ secrets.AWS_BUCKET_NAME }} - name: Invaildate CloudFront Cache - run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} —paths "/*" + run: aws cloudfront create-invalidation —distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} —paths "/*" From 7f05c3b21d72f60a1a1763e64dce2aa021aaa3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:16:15 +0900 Subject: [PATCH 09/33] =?UTF-8?q?feat:=20main.yml=20AWS=20S3=20CI/CD=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fc1abd2d..a3ea8ffd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,4 +53,4 @@ jobs: run: aws s3 cp --recursive --region ap-northeast-2 dist s3://${{ secrets.AWS_BUCKET_NAME }} - name: Invaildate CloudFront Cache - run: aws cloudfront create-invalidation —distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} —paths "/*" + run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} --paths "/*" From bc2a85aceb983518913ed88cb0b0f068e5ec1783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:20:54 +0900 Subject: [PATCH 10/33] =?UTF-8?q?feat:=20main.yml=20AWS=20S3=20CI/CD=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/signature/main/NoSignature.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signature/main/NoSignature.jsx b/src/pages/signature/main/NoSignature.jsx index cc2702ea..dcc3b881 100644 --- a/src/pages/signature/main/NoSignature.jsx +++ b/src/pages/signature/main/NoSignature.jsx @@ -11,7 +11,7 @@ export default function NoSignature() { - 아직 작성한 시그니처가 없어요! + 아직 작성한 시그니처가 없어요!! ); From 901dd5b4d86857e00911cd9225d7c7d469cfc5fc Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 01:05:53 +0900 Subject: [PATCH 11/33] =?UTF-8?q?Style:=20=EB=AA=A8=EB=93=A0=20=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=B0=8F=20=EB=8B=AC=EB=A0=A5=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20black=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/bottomSheet/BottomDetailScrollPage.style.js | 2 +- src/components/bottomSheet/BottomScrollPage.style.js | 2 +- src/components/calendar/TravelCalendar.style.js | 2 ++ src/components/modal/Modal.style.js | 3 ++- src/components/profile/ProfileBox.style.js | 1 + src/index.css | 2 ++ src/pages/dailyRecord/edit/DailyRecordEdit.style.js | 1 + src/pages/mate/ruleEdit/RuleEdit.style.js | 3 +++ src/pages/mate/ruleWrite/MateRuleWrite.style.js | 2 ++ 9 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/bottomSheet/BottomDetailScrollPage.style.js b/src/components/bottomSheet/BottomDetailScrollPage.style.js index 8ab9c829..c80a38d3 100644 --- a/src/components/bottomSheet/BottomDetailScrollPage.style.js +++ b/src/components/bottomSheet/BottomDetailScrollPage.style.js @@ -97,7 +97,7 @@ const Button = styled.button` ${theme.ALIGN.ROW_CENTER}; background-color: ${theme.COLOR.MAIN.GREEN}; border: none; - width: 400px; + width: 90%; height: 60px; color: ${theme.COLOR.MAIN.WHITE}; border-radius: 30px; diff --git a/src/components/bottomSheet/BottomScrollPage.style.js b/src/components/bottomSheet/BottomScrollPage.style.js index 655c869c..14bb4db1 100644 --- a/src/components/bottomSheet/BottomScrollPage.style.js +++ b/src/components/bottomSheet/BottomScrollPage.style.js @@ -11,7 +11,7 @@ const Button = styled.button` ${theme.ALIGN.ROW_CENTER}; background-color: ${theme.COLOR.MAIN.GREEN}; border: none; - width: 400px; + width: 90%; height: 60px; color: ${theme.COLOR.MAIN.WHITE}; border-radius: 30px; diff --git a/src/components/calendar/TravelCalendar.style.js b/src/components/calendar/TravelCalendar.style.js index 9364eb48..c71d2354 100644 --- a/src/components/calendar/TravelCalendar.style.js +++ b/src/components/calendar/TravelCalendar.style.js @@ -186,6 +186,7 @@ const PrevBtn = styled.button` border: none; font-size: 20px; left: 0; + color: ${theme.COLOR.MAIN.BLACK}; @media (min-width: 768px) { position: absolute; @@ -206,6 +207,7 @@ const NextBtn = styled.button` border: none; font-size: 20px; right: 0; + color: ${theme.COLOR.MAIN.BLACK}; @media (min-width: 768px) { position: absolute; diff --git a/src/components/modal/Modal.style.js b/src/components/modal/Modal.style.js index 4b8dc185..ddc5aa69 100644 --- a/src/components/modal/Modal.style.js +++ b/src/components/modal/Modal.style.js @@ -114,7 +114,8 @@ const Button = styled.button` border-bottom-right-radius: 0.5rem; border-bottom-left-radius: 0.5rem; - color: ${props => props.buttonColor}; + color: ${props => + props.buttonColor ? props.buttonColor : `${theme.COLOR.MAIN.BLACK}`}; background-color: transparent; cursor: pointer; diff --git a/src/components/profile/ProfileBox.style.js b/src/components/profile/ProfileBox.style.js index 4374278f..613c1b1c 100644 --- a/src/components/profile/ProfileBox.style.js +++ b/src/components/profile/ProfileBox.style.js @@ -76,6 +76,7 @@ const Button = styled.button` padding: 5px 11px; border-radius: 20px; margin-left: 10px; + color: ${theme.COLOR.MAIN.BLACK}; cursor: pointer; &:hover { diff --git a/src/index.css b/src/index.css index a472d510..d048ba47 100644 --- a/src/index.css +++ b/src/index.css @@ -102,6 +102,7 @@ max-width: 100%; border: none; line-height: 1.125em; + color: black; @media (min-width: 640px) { width: 500px; @@ -181,6 +182,7 @@ align-items: center; background-color: transparent; border: none; + color: black; } .react-calendar__tile:enabled:hover, diff --git a/src/pages/dailyRecord/edit/DailyRecordEdit.style.js b/src/pages/dailyRecord/edit/DailyRecordEdit.style.js index 270d277c..9610bdf2 100644 --- a/src/pages/dailyRecord/edit/DailyRecordEdit.style.js +++ b/src/pages/dailyRecord/edit/DailyRecordEdit.style.js @@ -141,6 +141,7 @@ const TitleText = styled.input` font-weight: 700; text-align: center; border: none; + padding: 0 5px; &::placeholder { color: #aaa; diff --git a/src/pages/mate/ruleEdit/RuleEdit.style.js b/src/pages/mate/ruleEdit/RuleEdit.style.js index f40e2310..f466c113 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.style.js +++ b/src/pages/mate/ruleEdit/RuleEdit.style.js @@ -2,6 +2,7 @@ import styled from 'styled-components'; import { FONT_SIZE } from '@/constants/size'; import theme from '@/theme'; +import { th } from 'date-fns/locale'; const Container = styled.div` ${theme.ALIGN.COLUMN_CENTER}; @@ -89,6 +90,7 @@ const DeleteRuleButton = styled.button` border-radius: 10px; text-align: center; cursor: pointer; + color: ${theme.COLOR.MAIN.BLACK}; &:hover { transform: scale(0.9); @@ -122,6 +124,7 @@ const AddQuestionButton = styled.button` border-radius: 10px; background-color: ${theme.COLOR.MAIN.LIGHT_GREEN}; cursor: pointer; + color: ${theme.COLOR.MAIN.BLACK}; &:hover { transform: scale(0.9); diff --git a/src/pages/mate/ruleWrite/MateRuleWrite.style.js b/src/pages/mate/ruleWrite/MateRuleWrite.style.js index 4ed76f41..dfe38964 100644 --- a/src/pages/mate/ruleWrite/MateRuleWrite.style.js +++ b/src/pages/mate/ruleWrite/MateRuleWrite.style.js @@ -86,6 +86,7 @@ const DeleteRuleButton = styled.button` border-radius: 10px; text-align: center; cursor: pointer; + color: ${theme.COLOR.MAIN.BLACK}; &:hover { transform: scale(0.9); @@ -127,6 +128,7 @@ const AddQuestionButton = styled.button` border-radius: 10px; background-color: ${theme.COLOR.MAIN.LIGHT_GREEN}; cursor: pointer; + color: ${theme.COLOR.MAIN.BLACK}; &:hover { transform: scale(0.9); From 8c7208ed2c851dc4828fdbe8c8fa46f8705aa41b Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:06:01 +0900 Subject: [PATCH 12/33] =?UTF-8?q?Style:=20=EC=8B=9C=EA=B7=B8=EB=8B=88?= =?UTF-8?q?=EC=B2=98=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=99=95=EC=9D=B8,?= =?UTF-8?q?=20=ED=99=88=20=ED=99=94=EB=A9=B4=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=EB=B0=B0=EB=84=88=20=EC=8A=A4=EC=BC=88=EB=A0=88=ED=86=A4=20?= =?UTF-8?q?UI=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/LoginBanner.jsx | 53 +++++++++----------- src/pages/quitUserPage/QuitUserPage.jsx | 4 +- src/pages/quitUserPage/QuitUserPage.style.js | 3 +- src/pages/signature/SignaturePage.jsx | 16 ++++-- src/pages/signature/main/MySignaturePage.jsx | 7 +++ 5 files changed, 46 insertions(+), 37 deletions(-) diff --git a/src/components/main/LoginBanner.jsx b/src/components/main/LoginBanner.jsx index 7d2d35c1..7150d3ef 100644 --- a/src/components/main/LoginBanner.jsx +++ b/src/components/main/LoginBanner.jsx @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import * as S from './LoginBanner.style'; -import LoginSkeleton from './skeleton/LoginSkeleton'; import profileImg from '/images/main/profileImg.svg'; import rightIcon from '/images/main/right.svg'; import { useGetMyProfile } from '@/hooks/profile/queries/useGetMyProfile'; @@ -20,34 +19,30 @@ export default function LoginBanner({ isLogin }) { return ( <> - {pendingState ? ( - - ) : ( - - - {isLogin ? ( - <> - - - {myProfile?.nickname}님 환영합니다🪐 - navigate('/mypage')}> - 내 프로필 가기 - - - - - ) : ( - <> - - navigate('/login')}> - 3초만에 로그인하기 - - - - )} - - - )} + + + {isLogin ? ( + <> + + + {myProfile?.nickname}님 환영합니다🪐 + navigate('/mypage')}> + 내 프로필 가기 + + + + + ) : ( + <> + + navigate('/login')}> + 3초만에 로그인하기 + + + + )} + + ); } diff --git a/src/pages/quitUserPage/QuitUserPage.jsx b/src/pages/quitUserPage/QuitUserPage.jsx index d611cf88..8263ddb4 100644 --- a/src/pages/quitUserPage/QuitUserPage.jsx +++ b/src/pages/quitUserPage/QuitUserPage.jsx @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'; import * as S from './QuitUserPage.style'; import RedirectIcon from '/images/RedirectIcon.png'; -const QuitUserPage = ({ type }) => { +const QuitUserPage = ({ type, bgColor }) => { const navigate = useNavigate(); let message; switch (type) { @@ -20,7 +20,7 @@ const QuitUserPage = ({ type }) => { message = ''; } return ( - +

{message}

navigate('/')}>홈 화면으로 돌아가기 diff --git a/src/pages/quitUserPage/QuitUserPage.style.js b/src/pages/quitUserPage/QuitUserPage.style.js index 03014cf0..fe2fdd99 100644 --- a/src/pages/quitUserPage/QuitUserPage.style.js +++ b/src/pages/quitUserPage/QuitUserPage.style.js @@ -20,7 +20,8 @@ const Container = styled.div` width: 100%; height: 100%; gap: 30px; - background-color: ${theme.COLOR.MAIN.LIGHT_GRAY}; + background-color: ${props => + props?.$bgColor ? props.$bgColor : `${theme.COLOR.MAIN.LIGHT_GRAY}`}; h3 { color: ${theme.COLOR.MAIN.BLACK}; diff --git a/src/pages/signature/SignaturePage.jsx b/src/pages/signature/SignaturePage.jsx index 5fe9a3df..f8e7ab7d 100644 --- a/src/pages/signature/SignaturePage.jsx +++ b/src/pages/signature/SignaturePage.jsx @@ -1,13 +1,15 @@ -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; +import toast from 'react-hot-toast'; import * as S from './SignaturePage.style'; import MySignaturePage from './main/MySignaturePage'; import Editor from './write/Editor'; -import { getSignaturePreview } from '@/apis/request/preview'; import Banner from '@/components/banner/Banner'; +import useAuth from '@/store/useAuth'; import useSignatureWrite from '@/store/useSignatureWrite'; export default function SignaturePage() { + const { isLogin } = useAuth(); const [selectedHeader, setSelectedHeader] = useState('내 시그니처'); const handleHeaderClick = header => { setSelectedHeader(header); @@ -22,7 +24,7 @@ export default function SignaturePage() { { - if (selectedHeader === '작성하기') { + if (selectedHeader === '작성하기' && isLogin) { if ( !confirm( '지금 작성 중인 모든 내용이 사라집니다.\n내 시그니처로 이동할까요?', @@ -41,8 +43,12 @@ export default function SignaturePage() { { - handleHeaderClick('작성하기'); - addPage(); + if (isLogin) { + handleHeaderClick('작성하기'); + addPage(); + } else { + toast('로그인이 필요한 기능입니다.'); + } }}> 작성하기 diff --git a/src/pages/signature/main/MySignaturePage.jsx b/src/pages/signature/main/MySignaturePage.jsx index 9b4f7df0..b5195141 100644 --- a/src/pages/signature/main/MySignaturePage.jsx +++ b/src/pages/signature/main/MySignaturePage.jsx @@ -3,9 +3,16 @@ import NoSignature from './NoSignature'; import Preview from '@/components/preview/Preview'; import PreviewSkeleton from '@/components/preview/skeleton/PreviewSkeleton'; import { useSignaturePreview } from '@/hooks/signature/useSignaturePreview '; +import { QuitUserPage } from '@/pages'; +import theme from '@/theme'; const MySignaturePage = () => { const { data: signaturePreview, loading, error } = useSignaturePreview(); + if (error) { + return ( + + ); + } return ( {loading ? ( From 4e11d5bb30cdbb548d52c398fe2705dff8945e10 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:25:40 +0900 Subject: [PATCH 13/33] =?UTF-8?q?Feat:=20=EB=A9=94=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=ED=83=AD=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9C=A0=EB=AC=B4=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mate/Search.jsx | 9 ++++++++- src/pages/mate/main/MateMain.jsx | 28 +++++++++++++++++++-------- src/pages/mate/main/MateMain.style.js | 5 +++++ 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/components/mate/Search.jsx b/src/components/mate/Search.jsx index 3cce94af..99377d76 100644 --- a/src/components/mate/Search.jsx +++ b/src/components/mate/Search.jsx @@ -1,12 +1,19 @@ import * as S from './Search.style'; +import useAuth from '@/store/useAuth'; const Search = ({ setSearchTerm }) => { + const { isLogin } = useAuth(); return ( setSearchTerm(e.target.value)} + disabled={!isLogin} /> diff --git a/src/pages/mate/main/MateMain.jsx b/src/pages/mate/main/MateMain.jsx index 9eb2bb1f..f7cd368e 100644 --- a/src/pages/mate/main/MateMain.jsx +++ b/src/pages/mate/main/MateMain.jsx @@ -1,9 +1,12 @@ +import toast from 'react-hot-toast'; + import * as S from './MateMain.style'; import mateRuleCheckIcon from '/images/mate/mateRule_check.svg'; import mateRuleWriteIcon from '/images/mate/mateRule_write.svg'; import mateManagementIcon from '/images/mate/mate_management.svg'; import mateSearchIcon from '/images/mate/mate_search.svg'; import Card from '@/components/mate/Card'; +import useAuth from '@/store/useAuth'; const MY_MATE = [ { @@ -39,15 +42,24 @@ const OUR_RULE = [ }, ]; -const renderCards = data => { - return data.map(({ id, link, text1, text2, imgSrc }) => ( - - - - )); +const renderCards = (data, isLogin) => { + return isLogin + ? data.map(({ id, link, text1, text2, imgSrc }) => ( + + + + )) + : data.map(({ id, link, text1, text2, imgSrc }) => ( + toast('로그인 후 이용 가능합니다.')}> + + + )); }; const MateMainPage = () => { + const { isLogin } = useAuth(); return ( @@ -57,13 +69,13 @@ const MateMainPage = () => { 내 메이트 나와 함께 여행 할 메이트들을 찾아보세요! - {renderCards(MY_MATE)} + {renderCards(MY_MATE, isLogin)} 우리 여행의 규칙은? 함께 여행할 메이트들과 규칙을 정해보세요! - {renderCards(OUR_RULE)} + {renderCards(OUR_RULE, isLogin)} ); diff --git a/src/pages/mate/main/MateMain.style.js b/src/pages/mate/main/MateMain.style.js index 52cac9fa..7daef71d 100644 --- a/src/pages/mate/main/MateMain.style.js +++ b/src/pages/mate/main/MateMain.style.js @@ -74,6 +74,10 @@ const LinkTo = styled(Link)` color: inherit; `; +const CardButton = styled.div` + cursor: pointer; +`; + export { Maincontainer, SpanWrapper, @@ -82,4 +86,5 @@ export { Des, CardContainer, LinkTo, + CardButton, }; From 6b62314a3b77ca04bc61971f5940a6131dda9982 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:39:27 +0900 Subject: [PATCH 14/33] =?UTF-8?q?Feat:=20=EC=BA=98=EB=A6=B0=EB=8D=94=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A7=80=EB=8F=84=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=9C=A0=EB=AC=B4=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/TravelCalendar.jsx | 72 ++++++++++++---------- src/components/schedules/SchedulesView.jsx | 5 +- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/components/calendar/TravelCalendar.jsx b/src/components/calendar/TravelCalendar.jsx index a972b4f3..a8316237 100644 --- a/src/components/calendar/TravelCalendar.jsx +++ b/src/components/calendar/TravelCalendar.jsx @@ -8,6 +8,7 @@ import * as S from './TravelCalendar.style'; import CalendarSkeleton from './skeleton/CalendarSkeleton'; import EditLight from '/icons/EditLight.svg'; import { useMonthlyJourney } from '@/hooks/home/useMonthlyJourney'; +import useAuth from '@/store/useAuth'; moment.locale('en'); @@ -17,6 +18,7 @@ const TravelCalendar = ({ setJourneyInfo, setMonthlyInfo, }) => { + const { isLogin } = useAuth(); const storedStartDate = localStorage.getItem('startDate'); const storedEndDate = localStorage.getItem('endDate'); @@ -188,39 +190,43 @@ const TravelCalendar = ({ nextLabel={{'>'}} /> - - {storedStartDate && storedEndDate ? ( - <> - - {journeyTitle ? ( -

🏖️ 선택된 여정 : {journeyTitle}

- ) : ( -

새로운 여정을 추가하고 여행 일정을 생성하세요!

- )} - -

- {moment(value).format('YYYY/MM/DD')} ~{' '} - {moment(endDate).format('YYYY/MM/DD')} -

-
- -

- Tip.{'\t'} - - 일지 작성 - - 버튼을 눌러 일지를 작성하면 지도에서 -
- 이미지로 표시된 위치를 확인할 수 있습니다. -

-
- - ) : ( -

- 달력에서 기간을 선택하면 저장된 일정을 확인할 수 있습니다. -

- )} -
+ {isLogin && ( + + {storedStartDate && storedEndDate ? ( + <> + + {journeyTitle ? ( +

🏖️ 선택된 여정 : {journeyTitle}

+ ) : ( +

새로운 여정을 추가하고 여행 일정을 생성하세요!

+ )} + +

+ {moment(value).format('YYYY/MM/DD')} ~{' '} + {moment(endDate).format('YYYY/MM/DD')} +

+
+ +

+ Tip.{'\t'} + + 일지 작성 + + 버튼을 눌러 일지를 작성하면 지도에서 +
+ 이미지로 표시된 위치를 확인할 수 있습니다. +

+
+ + ) : !isLogin ? ( + <> + ) : ( +

+ 달력에서 기간을 선택하면 저장된 일정을 확인할 수 있습니다. +

+ )} +
+ )} { - const accessToken = localStorage.getItem('x-access-token'); + const { isLogin } = useAuth(); const pageSize = 5; const date = new Date(startDate); @@ -73,7 +74,7 @@ const SchedulesView = ({ startDate, endDate, journeyTitle }) => {
)} - {!isLoading && !accessToken && ( + {!isLogin && ( 로그인 후 여정을 작성해보세요! From e3cd144c901a3b3f3fbc0bb818db5429ae659fd1 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:47:41 +0900 Subject: [PATCH 15/33] =?UTF-8?q?Feat:=20=EC=95=8C=EB=A6=BC=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=9C=A0=EB=AC=B4=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/navbar/Navbar.jsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/navbar/Navbar.jsx b/src/components/navbar/Navbar.jsx index eee4c57c..0c978517 100644 --- a/src/components/navbar/Navbar.jsx +++ b/src/components/navbar/Navbar.jsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +import toast from 'react-hot-toast'; import * as S from './Navbar.style'; import Bell from '/images/Bell.svg'; @@ -9,6 +9,7 @@ import useAuth from '@/store/useAuth'; const Navbar = () => { const { data: unReadCount, isPending, isError } = useUnReadNotification(); + const { isLogin } = useAuth(); const unReadCounter = unReadCount?.data?.data?.unreadCount; return ( @@ -19,13 +20,19 @@ const Navbar = () => { - - - + {isLogin ? ( + + + - {!unReadCounter ? null :

{unReadCounter}

} -
-
+ {!unReadCounter ? null :

{unReadCounter}

} +
+
+ ) : ( +
toast('로그인 후 알림을 확인해주세요!')}> + +
+ )} ); }; From 764c71e541fa3da74a80b92b3c5624d77e65979e Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 03:12:20 +0900 Subject: [PATCH 16/33] =?UTF-8?q?Feat:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=9C=A0=EC=A0=80=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9C=A0=EB=AC=B4=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mypage/Category.jsx | 6 +++++- src/pages/mypage/diary/MyDiary.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/mypage/Category.jsx b/src/components/mypage/Category.jsx index caa2b52e..f4a5ffc7 100644 --- a/src/components/mypage/Category.jsx +++ b/src/components/mypage/Category.jsx @@ -1,10 +1,14 @@ import SubCateGoryPage from './SubCateGoryPage'; import { ETC, SUPPORT, USER_SETTING } from '@/constants/subcategory'; +import useAuth from '@/store/useAuth'; const Category = () => { + const { isLogin } = useAuth(); return ( <> - + {isLogin && ( + + )} diff --git a/src/pages/mypage/diary/MyDiary.jsx b/src/pages/mypage/diary/MyDiary.jsx index 521dc268..6e4e87e4 100644 --- a/src/pages/mypage/diary/MyDiary.jsx +++ b/src/pages/mypage/diary/MyDiary.jsx @@ -30,7 +30,7 @@ const MyDiary = () => { - {isFetching + {isLoading ? new Array(10).fill(0).map(() => ) : diaryList?.map((page, pageIndex) => ( From f9a61bed3f0322358226c1db6da2c360c1c64894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:27:27 +0900 Subject: [PATCH 17/33] =?UTF-8?q?feat:=20=EC=95=BC=ED=98=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/main/MainPage.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/main/MainPage.jsx b/src/pages/main/MainPage.jsx index 5d1c66e0..a91b5e75 100644 --- a/src/pages/main/MainPage.jsx +++ b/src/pages/main/MainPage.jsx @@ -15,7 +15,6 @@ export default function MainPage() { -
야호!
From 1bf3fa91b6402fda7511716c34b61ac00f2b9bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 03:34:27 +0900 Subject: [PATCH 18/33] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20/=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20/=20?= =?UTF-8?q?=EA=B5=AC=EA=B8=80=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/LoginButton.jsx | 2 - src/components/login/SnsLoginButton.style.js | 4 +- src/pages/login/Login.jsx | 45 -------------------- 3 files changed, 2 insertions(+), 49 deletions(-) diff --git a/src/components/login/LoginButton.jsx b/src/components/login/LoginButton.jsx index 12efe675..8e446208 100644 --- a/src/components/login/LoginButton.jsx +++ b/src/components/login/LoginButton.jsx @@ -1,5 +1,3 @@ -import styled from 'styled-components'; - import GoogleLoginButton from './GoogleLoginButton'; import KakaoLoginButton from './KakaoLoginButton'; import { GoogleOAuthProvider } from '@react-oauth/google'; diff --git a/src/components/login/SnsLoginButton.style.js b/src/components/login/SnsLoginButton.style.js index 8cc5702e..f5fa0838 100644 --- a/src/components/login/SnsLoginButton.style.js +++ b/src/components/login/SnsLoginButton.style.js @@ -8,7 +8,7 @@ const LoginButton = styled.button` justify-content: center; align-items: center; width: 100%; - height: 35%; + height: 45%; color: black; border: none; padding: 10px 11px; @@ -36,7 +36,7 @@ const KLoginButton = styled.button` justify-content: center; align-items: center; width: 100%; - height: 35%; + height: 45%; color: black; border: none; padding: 10px 11px; diff --git a/src/pages/login/Login.jsx b/src/pages/login/Login.jsx index 788e4e0e..c6f90fcd 100644 --- a/src/pages/login/Login.jsx +++ b/src/pages/login/Login.jsx @@ -1,60 +1,15 @@ -import { useState } from 'react'; -import { useNavigate } from 'react-router-dom'; - import * as S from './Login.style'; import plane from '/images/airplane.svg'; import Logo from '/images/main.svg'; -import { axios, axiosWithToken } from '@/apis/api'; import LoginButton from '@/components/login/LoginButton'; -import useAuth from '@/store/useAuth'; const LoginPage = () => { - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); - const navigate = useNavigate(); - const { login } = useAuth(); - - const handleSubmit = async e => { - e.preventDefault(); - - try { - const response = await axios.post( - 'https://hereyou.kaaang.dev/api/v1/user/login', - { - email, - password, - }, - ); - - console.log(response); - login(response.data.token); - navigate('/'); - } catch (error) { - console.error('Login failed:', error.message); - } - }; - return ( -
- setEmail(e.target.value)} - /> - setPassword(e.target.value)} - /> - -
); From a380b3f21d419bd7925dd807a77e8d8041bc84e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 04:50:24 +0900 Subject: [PATCH 19/33] =?UTF-8?q?fix:=20=EA=B8=B0=ED=83=80=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/comment/signature/SignatureCommentList.jsx | 2 ++ .../comment/signature/SignatureCommentList.style.js | 2 +- src/components/main/Box.jsx | 4 ++-- src/components/modal/likerFindModal/LikerFindModal.style.js | 1 + src/pages/mate/Mate.jsx | 2 +- src/pages/mate/Mate.style.js | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/comment/signature/SignatureCommentList.jsx b/src/components/comment/signature/SignatureCommentList.jsx index 23d4ca16..749faaa6 100644 --- a/src/components/comment/signature/SignatureCommentList.jsx +++ b/src/components/comment/signature/SignatureCommentList.jsx @@ -20,6 +20,8 @@ const SignatureCommentList = () => { delay: 0, }); + console.log(signatureComments); + useEffect(() => { if (inView) { !isFetching && hasNextPage && fetchNextPage(); diff --git a/src/components/comment/signature/SignatureCommentList.style.js b/src/components/comment/signature/SignatureCommentList.style.js index 49f5dbbf..d8f06182 100644 --- a/src/components/comment/signature/SignatureCommentList.style.js +++ b/src/components/comment/signature/SignatureCommentList.style.js @@ -8,7 +8,7 @@ const Container = styled.div` align-items: center; max-height: 500px; width: 100%; - overflow: scroll; + overflow-y: scroll; &::-webkit-scrollbar { width: 4px; diff --git a/src/components/main/Box.jsx b/src/components/main/Box.jsx index ca5e0d76..a8bc38c4 100644 --- a/src/components/main/Box.jsx +++ b/src/components/main/Box.jsx @@ -8,8 +8,8 @@ import signatureIcon from '/images/main/signatureIcon.svg'; export default function Box({ title }) { const navigate = useNavigate(); - const route = title == '시그니처' ? '/signature ' : '/mate'; - console.log(route); + const route = title == '시그니처' ? '/signature' : '/mate'; + const des = title == '시그니처' ? '나만의 시그니처 작성하기 ' : '나의 여행 메이트 찾기'; const IconUrl = title == '시그니처' ? signatureIcon : mateIcon; diff --git a/src/components/modal/likerFindModal/LikerFindModal.style.js b/src/components/modal/likerFindModal/LikerFindModal.style.js index beee1eef..9265d3e9 100644 --- a/src/components/modal/likerFindModal/LikerFindModal.style.js +++ b/src/components/modal/likerFindModal/LikerFindModal.style.js @@ -51,6 +51,7 @@ const Button = styled.button` background-color: ${(props => props.follow) ? `${theme.COLOR.MAIN.LIGHT_GREEN}` : `${theme.COLOR.MAIN.LIGHT_GRAY}`}; + cursor: pointer; `; const UserImg = styled.img` diff --git a/src/pages/mate/Mate.jsx b/src/pages/mate/Mate.jsx index b9211a65..6f94fafa 100644 --- a/src/pages/mate/Mate.jsx +++ b/src/pages/mate/Mate.jsx @@ -77,7 +77,7 @@ const MatePage = () => { console.error(e); } }}> - {member.isFollowing === true ? '언팔로우' : '팔로우'} + {member.isFollowing === true ? '팔로잉' : '팔로우'} {member.introduction} diff --git a/src/pages/mate/Mate.style.js b/src/pages/mate/Mate.style.js index eefd8b48..7e258bdc 100644 --- a/src/pages/mate/Mate.style.js +++ b/src/pages/mate/Mate.style.js @@ -57,7 +57,7 @@ const NickNameContainer = styled.div` const FollowButton = styled.button` background-color: ${props => - props.follow ? theme.COLOR.MAIN.RED : theme.COLOR.MAIN.MEDIUM_GREEN}; + props.follow ? theme.COLOR.MAIN.GRAY : theme.COLOR.MAIN.MEDIUM_GREEN}; padding: 8px 16px; border: none; border-radius: 20px; From 7437dcc2da52760f41b501d966beb659b1968fd2 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 05:17:40 +0900 Subject: [PATCH 20/33] =?UTF-8?q?bug:=20=EC=8B=9C=EA=B7=B8=EB=8B=88?= =?UTF-8?q?=EC=B2=98=20=EB=8B=B5=EA=B8=80=20=EC=B2=98=EB=A6=AC,=20?= =?UTF-8?q?=EC=8B=9C=EA=B7=B8=EB=8B=88=EC=B2=98=20=EB=B0=9C=ED=96=89=20?= =?UTF-8?q?=ED=95=9C=EB=B2=88=EB=A7=8C=20=EC=9A=94=EC=B2=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/TravelCalendar.jsx | 3 +++ .../comment/signature/commentView/SignatureComment.jsx | 8 +++++--- src/pages/signature/write/Editor.jsx | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/calendar/TravelCalendar.jsx b/src/components/calendar/TravelCalendar.jsx index a8316237..8b60fa67 100644 --- a/src/components/calendar/TravelCalendar.jsx +++ b/src/components/calendar/TravelCalendar.jsx @@ -101,6 +101,9 @@ const TravelCalendar = ({ setJourneyInfo(null); setJourneyTitle(''); } + } else { + setJourneyInfo(null); + setJourneyTitle(''); } } }; diff --git a/src/components/comment/signature/commentView/SignatureComment.jsx b/src/components/comment/signature/commentView/SignatureComment.jsx index 8e77fece..1b630a7c 100644 --- a/src/components/comment/signature/commentView/SignatureComment.jsx +++ b/src/components/comment/signature/commentView/SignatureComment.jsx @@ -111,9 +111,11 @@ const SignatureComment = ({ data }) => { {writer?.name} {/* 본인 댓글이거나 게시글 주인인 경우에만 답글 버튼 표시 */} - setIsReplying(prev => !prev)}> - {isReplying === true ? : } - + {isParentComment && ( + setIsReplying(prev => !prev)}> + {isReplying === true ? : } + + )} {/* 본인 댓글인 경우에만 수정 및 삭제 버튼 표시 */} {writer?.is_writer && !editMode && ( <> diff --git a/src/pages/signature/write/Editor.jsx b/src/pages/signature/write/Editor.jsx index d2582ba1..31cbb881 100644 --- a/src/pages/signature/write/Editor.jsx +++ b/src/pages/signature/write/Editor.jsx @@ -118,7 +118,9 @@ export default function Editor({ setSelectedHeader }) { - 발행 + + 발행 + {(currentPageIndex === pages.length - 1 || pages.length === 1) && ( 페이지 추가 )} From 587db0ec1ffa73d1d1ce4af433183e65752554b2 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 13:02:00 +0900 Subject: [PATCH 21/33] =?UTF-8?q?bug:=20schedules=20=EB=AC=B4=ED=95=9C?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=98=A4=EB=A5=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/schedules/SchedulesView.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/schedules/SchedulesView.jsx b/src/components/schedules/SchedulesView.jsx index ceb584ac..dbc8c685 100644 --- a/src/components/schedules/SchedulesView.jsx +++ b/src/components/schedules/SchedulesView.jsx @@ -34,7 +34,7 @@ const SchedulesView = ({ startDate, endDate, journeyTitle }) => { if (!lastPage?.data?.data?.data?.meta?.hasNextData) { return null; } else { - return lastPage?.data?.data?.data?.meta?.cursor + 1; + return lastPage?.data?.data?.data?.meta?.cursor; } }, staleTime: 60 * 1000, From 9ce6bf04ad31273f8a4c1204da14acdf5adb90ae Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 17:14:13 +0900 Subject: [PATCH 22/33] =?UTF-8?q?bug:=20bottomDetailScrollPage=20=EB=AC=B4?= =?UTF-8?q?=ED=95=9C=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/bottomSheet/BottomDetailScrollPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/bottomSheet/BottomDetailScrollPage.jsx b/src/components/bottomSheet/BottomDetailScrollPage.jsx index 6f2f5074..007a7c8b 100644 --- a/src/components/bottomSheet/BottomDetailScrollPage.jsx +++ b/src/components/bottomSheet/BottomDetailScrollPage.jsx @@ -27,7 +27,7 @@ const BottomDetailScrollPage = ({ startDate, endDate }) => { if (!lastPage?.data?.data?.data?.meta?.hasNextData) { return null; } else { - return lastPage?.data?.data?.data?.meta?.cursor + 1; + return lastPage?.data?.data?.data?.meta?.cursor; } }, staleTime: 60 * 1000, From 70ca7f0526ed2ead5f394eca4fef9f60f1e2b2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 17:43:13 +0900 Subject: [PATCH 23/33] =?UTF-8?q?feat:=20=EA=B2=8C=EC=8B=9C=EA=B8=80?= =?UTF-8?q?=EC=9D=98=20=EC=A3=BC=EC=9D=B8=EC=9D=B8=20=EA=B2=BD=EC=9A=B0,?= =?UTF-8?q?=20=EB=8C=93=EA=B8=80=20=EC=82=AD=EC=A0=9C=EA=B0=80=20=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EA=B2=8C=20=EB=A1=9C=EC=A7=81=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../signature/commentView/SignatureComment.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/comment/signature/commentView/SignatureComment.jsx b/src/components/comment/signature/commentView/SignatureComment.jsx index 1b630a7c..92f8bdc9 100644 --- a/src/components/comment/signature/commentView/SignatureComment.jsx +++ b/src/components/comment/signature/commentView/SignatureComment.jsx @@ -137,6 +137,20 @@ const SignatureComment = ({ data }) => { /> )} + {can_delete && !editMode && ( + <> + { + try { + await deleteReComment({ signatureId, commentId: _id }); + } catch (e) { + console.error(e); + } + }} + /> + + )} {editMode && ( <> Date: Sun, 18 Feb 2024 18:41:34 +0900 Subject: [PATCH 24/33] =?UTF-8?q?feat:=20Signature=20Page=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 --- .../comment/signature/commentView/SignatureComment.jsx | 1 + src/pages/quitUserPage/QuitUserPage.jsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/components/comment/signature/commentView/SignatureComment.jsx b/src/components/comment/signature/commentView/SignatureComment.jsx index 92f8bdc9..c0aa6304 100644 --- a/src/components/comment/signature/commentView/SignatureComment.jsx +++ b/src/components/comment/signature/commentView/SignatureComment.jsx @@ -137,6 +137,7 @@ const SignatureComment = ({ data }) => { /> )} + {/* 모두 삭제하는 권한이 있는 경우. */} {can_delete && !editMode && ( <> { case 'not-login': message = '로그인 후 서비스를 이용해주세요!'; break; + case 'no-diary-data': + message = '작성하신 하루일지가 없습니다.'; + break; default: message = ''; } From 1239ec802cada5a80810cf4bee70ebe6ad4f9d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 19:07:20 +0900 Subject: [PATCH 25/33] =?UTF-8?q?fix:=20Signature=20Comment=20=EC=88=98?= =?UTF-8?q?=EC=A0=95(=EC=93=B0=EB=A0=88=EA=B8=B0=ED=86=B5=202=EA=B0=9C=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EB=8A=94=20=ED=98=84=EC=83=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commentView/SignatureComment.jsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/components/comment/signature/commentView/SignatureComment.jsx b/src/components/comment/signature/commentView/SignatureComment.jsx index c0aa6304..ab80fade 100644 --- a/src/components/comment/signature/commentView/SignatureComment.jsx +++ b/src/components/comment/signature/commentView/SignatureComment.jsx @@ -125,21 +125,25 @@ const SignatureComment = ({ data }) => { setEditMode(true); }} /> - { - try { - await deleteReComment({ signatureId, commentId: _id }); - } catch (e) { - console.error(e); - } - }} - /> + {!can_delete && ( // can_delete가 false일 때만 쓰레기통 아이콘 표시 + { + try { + await deleteReComment({ signatureId, commentId: _id }); + } catch (e) { + console.error(e); + } + }} + /> + )} )} + {/* 모두 삭제하는 권한이 있는 경우. */} - {can_delete && !editMode && ( - <> + {can_delete && + !writer?.is_writer && + !editMode && ( // writer가 아니고, can_delete가 true일 때만 쓰레기통 아이콘 표시 { @@ -150,8 +154,7 @@ const SignatureComment = ({ data }) => { } }} /> - - )} + )} {editMode && ( <> Date: Sun, 18 Feb 2024 19:16:48 +0900 Subject: [PATCH 26/33] =?UTF-8?q?fix:=20Signature=20Comment=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comment/signature/commentView/SignatureComment.jsx | 2 -- src/pages/notification/Notification.jsx | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/comment/signature/commentView/SignatureComment.jsx b/src/components/comment/signature/commentView/SignatureComment.jsx index ab80fade..c191eeba 100644 --- a/src/components/comment/signature/commentView/SignatureComment.jsx +++ b/src/components/comment/signature/commentView/SignatureComment.jsx @@ -139,10 +139,8 @@ const SignatureComment = ({ data }) => { )} )} - {/* 모두 삭제하는 권한이 있는 경우. */} {can_delete && - !writer?.is_writer && !editMode && ( // writer가 아니고, can_delete가 true일 때만 쓰레기통 아이콘 표시 { const { data, isPending, isError } = useGetNotification(); const notification = data?.data?.data; + console.log(notification); return ( {isPending ? ( From d8861b854a07597f7298bf1c79074716ae1f4776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 20:14:07 +0900 Subject: [PATCH 27/33] =?UTF-8?q?feat:=20Notification=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=EB=B3=84=20=EC=95=8C=EB=A6=BC=20=EA=B5=AC=EB=B6=84=20=EB=B0=8F?= =?UTF-8?q?=20API=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/NotificationPage.jsx | 63 ++++++++++++------- .../notification/NotificationPage.style.js | 21 ++++++- src/pages/notification/Notification.jsx | 6 +- 3 files changed, 64 insertions(+), 26 deletions(-) diff --git a/src/components/notification/NotificationPage.jsx b/src/components/notification/NotificationPage.jsx index 679f670b..5a056d04 100644 --- a/src/components/notification/NotificationPage.jsx +++ b/src/components/notification/NotificationPage.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useNavigate } from 'react-router-dom'; import * as S from './NotificationPage.style'; @@ -6,34 +5,56 @@ import Book from '/images/Book_light.svg'; import Comment from '/images/comment_light.svg'; import Heart from '/images/signature/ClickedHeart.svg'; -const NotificationPage = ({ notification }) => { +const NotificationPage = ({ notifications }) => { const navigate = useNavigate(); + console.log(notifications); return ( - {notification?.map(list => ( - - {list.type === 'LIKE' && ( + {notifications?.map(notify => + notify?.content?.type === 'SIGNATURE' ? ( + notify?.content?.action === 'LIKE' ? ( navigate(`/signature/post/${list.itemId}`)}> - - {list.content} + onClick={() => navigate(`/signature/post/${notify?.itemId}`)}> + + +

+ {notify?.content?.actionUserNickname}님이 회원님의 시그니처 + {notify?.itemDesc && `(${notify?.itemDesc})`}에 + 좋아요를 남겼습니다. +

+
- )} - {list.type === 'COMMENT' && ( - - - {list.content} + ) : ( + navigate(`/signature/post/${notify?.itemId}`)}> + + +

+ {notify?.content?.actionUserNickname}님이 회원님의 시그니처 + {notify?.itemDesc && `(${notify?.itemDesc})`}에 + 댓글을 남겼습니다. +

+
- )} - {list.type === 'INVITE' && ( - - - {list.content} + ) + ) : ( + notify?.content?.type === 'RULE' && + notify?.content?.action === 'COMMENT' && ( + navigate(`/mate/rule-check/${notify?.itemId}`)}> + + +

+ {notify?.content?.actionUserNickname}님이 회원님의 규칙 + {notify?.itemDesc && `(${notify?.itemDesc})`}에 + 댓글을 남겼습니다. +

+
- )} -
- ))} + ) + ), + )}
); }; diff --git a/src/components/notification/NotificationPage.style.js b/src/components/notification/NotificationPage.style.js index f9ad4b24..04f44923 100644 --- a/src/components/notification/NotificationPage.style.js +++ b/src/components/notification/NotificationPage.style.js @@ -15,7 +15,7 @@ const NotificationContainer = styled.div` flex-direction: row; align-items: center; width: 95%; - font-size: ${FONT_SIZE.LG}; + font-size: ${FONT_SIZE.SM}; margin-bottom: 30px; padding: 20px; border-radius: 10px; @@ -29,11 +29,20 @@ const NotificationContainer = styled.div` font-size: ${FONT_SIZE.SM}; } + h3 { + color: ${theme.COLOR.MAIN.GREEN}; + } + span { color: ${theme.COLOR.MAIN.GREEN}; + font-size: ${FONT_SIZE.h3}; } `; +const TextContainer = styled.div` + width: 100%; +`; + const Img = styled.img` width: 8%; margin-right: 20px; @@ -63,4 +72,12 @@ const Text = styled.div` font-size: 23px; `; -export { Container, NotificationContainer, Img, BellContainer, Bell, Text }; +export { + Container, + NotificationContainer, + TextContainer, + Img, + BellContainer, + Bell, + Text, +}; diff --git a/src/pages/notification/Notification.jsx b/src/pages/notification/Notification.jsx index bb632cc5..3ce1f51e 100644 --- a/src/pages/notification/Notification.jsx +++ b/src/pages/notification/Notification.jsx @@ -5,14 +5,14 @@ import { useGetNotification } from '@/hooks/notification/useGetNotification'; const Notification = () => { const { data, isPending, isError } = useGetNotification(); - const notification = data?.data?.data; - console.log(notification); + const notifications = data?.data?.data; + return ( {isPending ? ( ) : ( - + )} ); From c2ff03b3d5af568491fdc790561e4cfc0544ed93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 20:22:01 +0900 Subject: [PATCH 28/33] =?UTF-8?q?style:=20console.log=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/comment/signature/SignatureCommentList.jsx | 2 -- src/components/modal/mypage/PublicScopeModal.jsx | 1 - src/components/notification/NotificationPage.jsx | 1 - src/components/schedules/Schedules.jsx | 2 +- src/mocks/handlers/mate.js | 2 -- src/pages/mate/ruleEdit/RuleEdit.jsx | 1 - 6 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/comment/signature/SignatureCommentList.jsx b/src/components/comment/signature/SignatureCommentList.jsx index 749faaa6..23d4ca16 100644 --- a/src/components/comment/signature/SignatureCommentList.jsx +++ b/src/components/comment/signature/SignatureCommentList.jsx @@ -20,8 +20,6 @@ const SignatureCommentList = () => { delay: 0, }); - console.log(signatureComments); - useEffect(() => { if (inView) { !isFetching && hasNextPage && fetchNextPage(); diff --git a/src/components/modal/mypage/PublicScopeModal.jsx b/src/components/modal/mypage/PublicScopeModal.jsx index c7d406e9..dd37b209 100644 --- a/src/components/modal/mypage/PublicScopeModal.jsx +++ b/src/components/modal/mypage/PublicScopeModal.jsx @@ -75,7 +75,6 @@ const PublicScopeModal = ({ myVisibility }) => { toast.success('공개범위가 설정되었습니다.'); } } catch (error) { - console.log(error); console.error('서버 내부 오류.', error); toast.error('서버 내부 오류'); } finally { diff --git a/src/components/notification/NotificationPage.jsx b/src/components/notification/NotificationPage.jsx index 5a056d04..b36e1247 100644 --- a/src/components/notification/NotificationPage.jsx +++ b/src/components/notification/NotificationPage.jsx @@ -7,7 +7,6 @@ import Heart from '/images/signature/ClickedHeart.svg'; const NotificationPage = ({ notifications }) => { const navigate = useNavigate(); - console.log(notifications); return ( diff --git a/src/components/schedules/Schedules.jsx b/src/components/schedules/Schedules.jsx index 881b1894..36b39886 100644 --- a/src/components/schedules/Schedules.jsx +++ b/src/components/schedules/Schedules.jsx @@ -78,7 +78,7 @@ const Schedules = ({ data, endDate, refetch }) => { } } catch (e) { setError(true); - console.log(e); + toast.error('일정 초기화 중 에러가 발생했습니다.'); } finally { setLoading(false); diff --git a/src/mocks/handlers/mate.js b/src/mocks/handlers/mate.js index 043a6c59..e4932a05 100644 --- a/src/mocks/handlers/mate.js +++ b/src/mocks/handlers/mate.js @@ -602,8 +602,6 @@ export const MateHandlers = [ ({ request, params }) => { const ruleId = params.ruleId; - console.log(ruleId); - if (!ruleId) { return new HttpResponse(null, { status: 404 }); } diff --git a/src/pages/mate/ruleEdit/RuleEdit.jsx b/src/pages/mate/ruleEdit/RuleEdit.jsx index 960d871b..e2c1a0db 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.jsx +++ b/src/pages/mate/ruleEdit/RuleEdit.jsx @@ -84,7 +84,6 @@ const RuleEditPage = () => { rulePairs: sortedRulePairs, membersId: extractMembersId, }; - console.log(postDataWithId); updateTeamMateRule(ruleId, { postDataWithId }) .then(() => { From 9452624ec82491b6179e6f82c318fb2c806a0a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 20:45:15 +0900 Subject: [PATCH 29/33] =?UTF-8?q?feat:=20=ED=83=90=EC=83=89=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20data=20=EC=97=86=EC=9D=84=EB=96=84=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/explore/SignatureSearchSlider.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/explore/SignatureSearchSlider.jsx b/src/components/explore/SignatureSearchSlider.jsx index 96d44ea3..6b91934c 100644 --- a/src/components/explore/SignatureSearchSlider.jsx +++ b/src/components/explore/SignatureSearchSlider.jsx @@ -15,6 +15,12 @@ const SignatureSearchSlider = ({ data, type, searchTerm }) => { "{searchTerm}" 에 관한 시그니처⭐ )} + {data?.length === 0 && ( + + {type === 'hot' &&

시그니처를 작성해주세요~!

} + {type === 'new' &&

시그니처를 작성해주세요~!

} +
+ )} {data === null ? ( 로그인 후 From af6572449f5f72b2906dac63248d94e2c0ca5d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 20:52:45 +0900 Subject: [PATCH 30/33] =?UTF-8?q?feat:=20=ED=83=90=EC=83=89=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20NoSignature=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/explore/SignatureSearchSlider.jsx | 5 +++-- src/pages/signature/main/NoSignature.jsx | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/explore/SignatureSearchSlider.jsx b/src/components/explore/SignatureSearchSlider.jsx index 6b91934c..1c9ef81e 100644 --- a/src/components/explore/SignatureSearchSlider.jsx +++ b/src/components/explore/SignatureSearchSlider.jsx @@ -2,6 +2,7 @@ import { useNavigate } from 'react-router-dom'; import Preview from './Preview'; import * as S from './SignatureSearchSlider.style'; +import NoSignature from '@/pages/signature/main/NoSignature'; const SignatureSearchSlider = ({ data, type, searchTerm }) => { const navigate = useNavigate(); @@ -17,8 +18,8 @@ const SignatureSearchSlider = ({ data, type, searchTerm }) => { {data?.length === 0 && ( - {type === 'hot' &&

시그니처를 작성해주세요~!

} - {type === 'new' &&

시그니처를 작성해주세요~!

} + {type === 'hot' && } + {type === 'new' && }
)} {data === null ? ( diff --git a/src/pages/signature/main/NoSignature.jsx b/src/pages/signature/main/NoSignature.jsx index dcc3b881..eba6b690 100644 --- a/src/pages/signature/main/NoSignature.jsx +++ b/src/pages/signature/main/NoSignature.jsx @@ -4,9 +4,7 @@ import { useNavigate } from 'react-router-dom'; import * as S from './NoSignature.style'; import bookImg from '/images/bookImg.svg'; -//내 시그니처 없으면 띄우는 페이지 export default function NoSignature() { - const navigate = useNavigate(); return ( From a34be33b9098ecfc8ebff96ee427167e068bd32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 21:12:33 +0900 Subject: [PATCH 31/33] =?UTF-8?q?feat:=20FollowRedirectPage=20=EC=A0=9C?= =?UTF-8?q?=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../explore/SignatureSearchSlider.jsx | 3 +- .../followRedirect/FollowRedirectPage.jsx | 20 +++++++++ .../FollowRedirectPage.style.js | 43 +++++++++++++++++++ src/pages/signature/main/NoSignature.jsx | 3 -- 4 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 src/pages/explore/followRedirect/FollowRedirectPage.jsx create mode 100644 src/pages/explore/followRedirect/FollowRedirectPage.style.js diff --git a/src/components/explore/SignatureSearchSlider.jsx b/src/components/explore/SignatureSearchSlider.jsx index 1c9ef81e..0967176a 100644 --- a/src/components/explore/SignatureSearchSlider.jsx +++ b/src/components/explore/SignatureSearchSlider.jsx @@ -2,6 +2,7 @@ import { useNavigate } from 'react-router-dom'; import Preview from './Preview'; import * as S from './SignatureSearchSlider.style'; +import FollowRedirectPage from '@/pages/explore/followRedirect/FollowRedirectPage'; import NoSignature from '@/pages/signature/main/NoSignature'; const SignatureSearchSlider = ({ data, type, searchTerm }) => { @@ -19,7 +20,7 @@ const SignatureSearchSlider = ({ data, type, searchTerm }) => { {data?.length === 0 && ( {type === 'hot' && } - {type === 'new' && } + {type === 'new' && } )} {data === null ? ( diff --git a/src/pages/explore/followRedirect/FollowRedirectPage.jsx b/src/pages/explore/followRedirect/FollowRedirectPage.jsx new file mode 100644 index 00000000..c6fab338 --- /dev/null +++ b/src/pages/explore/followRedirect/FollowRedirectPage.jsx @@ -0,0 +1,20 @@ +import { useNavigate } from 'react-router-dom'; + +import * as S from './FollowRedirectPage.style'; +import AirplaneImg from '/images/onboarding1.svg'; + +const FollowRedirectPage = () => { + const navigate = useNavigate(); + return ( + + + + 로그인하고 내 메이트와 + 새로운 여행 기록을 확인해보세요! + navigate('/login')}>로그인 하기 + + + ); +}; + +export default FollowRedirectPage; diff --git a/src/pages/explore/followRedirect/FollowRedirectPage.style.js b/src/pages/explore/followRedirect/FollowRedirectPage.style.js new file mode 100644 index 00000000..c894070a --- /dev/null +++ b/src/pages/explore/followRedirect/FollowRedirectPage.style.js @@ -0,0 +1,43 @@ +import styled from 'styled-components'; + +import theme from '@/theme'; + +const PageContainer = styled.div` + display: flex; + justify-content: center; + align-items: center; + width: 70%; + height: 40vh; + margin: 0 auto; +`; +const ContentContainer = styled.div` + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + gap: 10px; +`; + +const Text = styled.div` + display: flex; + font-size: 18px; + font-family: 'Pretendard-bold'; +`; + +const Button = styled.div` + display: flex; + background-color: ${theme.COLOR.MAIN.GREEN}; + color: white; + font-size: 20px; + filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)); + border-radius: 30px; + padding: 12px 50px; + + cursor: pointer; + + &:hover { + transform: scale(0.95); + } +`; + +export { PageContainer, ContentContainer, Button, Text }; diff --git a/src/pages/signature/main/NoSignature.jsx b/src/pages/signature/main/NoSignature.jsx index eba6b690..50a2762e 100644 --- a/src/pages/signature/main/NoSignature.jsx +++ b/src/pages/signature/main/NoSignature.jsx @@ -1,6 +1,3 @@ -import React from 'react'; -import { useNavigate } from 'react-router-dom'; - import * as S from './NoSignature.style'; import bookImg from '/images/bookImg.svg'; From 818f503fc6899ff69c488a29ff510c48205d0c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sun, 18 Feb 2024 21:13:45 +0900 Subject: [PATCH 32/33] =?UTF-8?q?feat:=20MateCommentInput=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=97=86=EC=9D=84=20=EA=B2=BD=EC=9A=B0,?= =?UTF-8?q?=20=EB=A1=9C=EA=B3=A0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/comment/mate/commentInput/MateCommentInput.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/comment/mate/commentInput/MateCommentInput.jsx b/src/components/comment/mate/commentInput/MateCommentInput.jsx index f26e6ccc..9ece9bf6 100644 --- a/src/components/comment/mate/commentInput/MateCommentInput.jsx +++ b/src/components/comment/mate/commentInput/MateCommentInput.jsx @@ -2,6 +2,7 @@ import { useRef, useState } from 'react'; import toast from 'react-hot-toast'; import * as S from './MateCommentInput.style'; +import Logo from '/images/mypage/MyPageLogo.svg'; import { postMateRuleComment } from '@/apis/request/mate'; import { useGetMyProfile } from '@/hooks/profile/queries/useGetMyProfile'; import { useMutation, useQueryClient } from '@tanstack/react-query'; @@ -44,7 +45,7 @@ const MateCommentInput = ({ ruleId }) => { return ( - + Date: Sun, 18 Feb 2024 23:17:09 +0900 Subject: [PATCH 33/33] =?UTF-8?q?[Feat]:=20=EC=95=8C=EB=A6=BCmsw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/profile.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/mocks/handlers/profile.js b/src/mocks/handlers/profile.js index b644ee45..1422e18b 100644 --- a/src/mocks/handlers/profile.js +++ b/src/mocks/handlers/profile.js @@ -58,25 +58,13 @@ export const ProfileHandlers = [ data: [ { id: 1, - type: 'LIKE', - content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', - itemId: 10, - isRead: false, - created: '2024-02-11T14:52:14.240Z', - }, - { - id: 2, - type: 'COMMENT', - content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', - itemId: 10, - isRead: false, - created: '2024-02-11T14:52:14.240Z', - }, - { - id: 3, - type: 'INVITE', - content: '상추부자, 이녕12님 외 10명이 내 시그니처에 좋아요', + content: { + actionUserNickname: '상추부자', + type: 'SIGNATURE', + action: 'LIKE', + }, itemId: 10, + itemDesc: '테스트 게시물', isRead: false, created: '2024-02-11T14:52:14.240Z', },