From b282bfb130986f6344daf1efab011105940b6aaa Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sat, 17 Feb 2024 16:02:22 +0900 Subject: [PATCH 01/52] =?UTF-8?q?[Docs]=20:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/request/auth.js | 65 --------------------- src/apis/request/home.js | 8 --- src/apis/request/map.js | 13 +---- src/apis/request/mate.js | 19 ------ src/apis/request/preview.js | 11 ---- src/apis/request/travel.js | 11 ---- src/hooks/home/useDetailJourneyMap.js | 28 --------- src/hooks/home/useGetDetailJourney.js | 28 --------- src/hooks/home/useLoadMonthlyJourney.js | 30 ---------- src/hooks/mate/useExploreMate.js | 30 ---------- src/hooks/mate/useMateProfileSearch.js | 28 --------- src/hooks/mate/useParticipateTeamMate.js | 29 --------- src/hooks/mate/useSearchMate.js | 30 ---------- src/hooks/mate/useTeamMateRuleComment.js | 29 --------- src/hooks/mate/useTeamRuleList.js | 28 --------- src/hooks/signature/useDeleteMySignature.js | 30 ---------- src/hooks/signature/useLikeSignature.js | 30 ---------- src/hooks/signature/usePostNewSignature .js | 30 ---------- src/hooks/signature/useUpdateMySignature.js | 31 ---------- src/pages/signature/SignaturePage.jsx | 1 - 20 files changed, 2 insertions(+), 507 deletions(-) delete mode 100644 src/apis/request/auth.js delete mode 100644 src/apis/request/preview.js delete mode 100644 src/apis/request/travel.js delete mode 100644 src/hooks/home/useDetailJourneyMap.js delete mode 100644 src/hooks/home/useGetDetailJourney.js delete mode 100644 src/hooks/home/useLoadMonthlyJourney.js delete mode 100644 src/hooks/mate/useExploreMate.js delete mode 100644 src/hooks/mate/useMateProfileSearch.js delete mode 100644 src/hooks/mate/useParticipateTeamMate.js delete mode 100644 src/hooks/mate/useSearchMate.js delete mode 100644 src/hooks/mate/useTeamMateRuleComment.js delete mode 100644 src/hooks/mate/useTeamRuleList.js delete mode 100644 src/hooks/signature/useDeleteMySignature.js delete mode 100644 src/hooks/signature/useLikeSignature.js delete mode 100644 src/hooks/signature/usePostNewSignature .js delete mode 100644 src/hooks/signature/useUpdateMySignature.js diff --git a/src/apis/request/auth.js b/src/apis/request/auth.js deleted file mode 100644 index d5a65ac8..00000000 --- a/src/apis/request/auth.js +++ /dev/null @@ -1,65 +0,0 @@ -// 코드 작성 전 필독! -// 지금은 백엔드와 연동을 하지 않은 상태이기 때문에 msw라는 mock server를 사용중입니다. -// 그래서 여기에 api 요청 함수를 추가하게 되면 mocks에 handler에도 추가해야 되는데요(handler에 코드 추가 방법은 예시 코드와 구글 검색 참고) -// 이때 경로를 이곳에 한 번 handler에 한 번 총 두 번을 입력하게 됩니다. -// 만약 경로에 문제가 생겨서 수정해야 하는 경우 두 곳을 수정해야 합니다. -// 이때 오류가 발생할 수 있어요.. -// -// 그래서 결론은 경로의 경우 여기에 직접 입력하지 않고 -// constants 폴더의 path.js에 API_PATH에 추가하거나 기존에 있는 경로 사용해주세요! -// 어떻게 작성하는지 어떻게 사용하는지는 이미 써져 있는 코드 참고하시면 될 듯 합니다. -// 그런데 :id와 같은 파라미터는 path로 지정하지 말아주세요! -import { axios, axiosWithToken } from 'apis/api'; -import { API_PATH } from 'constants/path'; - -const requestLogin = authData => { - return axios.post(API_PATH.LOGIN, authData); -}; - -const requestFindPassWord = email => { - return axios.post(API_PATH.FINDING, email); -}; - -const requestSignUp = signUpData => { - return axios.post(API_PATH.SIGNUP, signUpData); -}; - -const requestCheckDuplicateId = id => { - return axios.get(`${API_PATH.CHECK_ID}/${id}`); -}; - -const requestCheckDuplicateNickName = nickName => { - return axios.get(`${API_PATH.CHECK_NICKNAME}/${nickName}`); -}; - -const requestCheckDuplicateEmail = email => { - return axios.get(`${API_PATH.CHECK_EMAIL}/${email}`); -}; - -const requestWithDrawal = () => { - return axiosWithToken.post(`${API_PATH.WITHDRAWAL}`); -}; - -const requestChangePassWord = () => { - return axios.patch(`${API_PATH.CHANGE_PASSWORD}`); -}; - -const requestUser = () => { - return axiosWithToken.get(`${API_PATH.USER_INFO}`); -}; - -const changeNickname = nickname => { - return axiosWithToken.post(`${API_PATH.CHANGE_NICKNAME}/${nickname}`); -}; - -export // requestLogin, -// requestFindPassWord, -// requestSignUp, -// requestCheckDuplicateId, -// requestCheckDuplicateNickName, -// requestCheckDuplicateEmail, -// requestWithDrawal, -// requestChangePassWord, -// requestUser, -// changeNickname, - {}; diff --git a/src/apis/request/home.js b/src/apis/request/home.js index 77d9e8de..63a67c3f 100644 --- a/src/apis/request/home.js +++ b/src/apis/request/home.js @@ -1,13 +1,6 @@ import { axiosWithToken } from '../api'; import { API_BASE, VERSION } from '@/constants/path'; -// 월별 일정 불러오기 (확정 X) -const loadMonthlySchedule = (year, month) => { - const url = `/api/${VERSION}/${API_BASE.SCHEDULE}/monthly/${year}/${month}`; - const res = axiosWithToken.get(url); - return res; -}; - // 월별 일정 불러오기 (무한스크롤) const getSchedule = (date, pageParam, pageSize) => { const url = `/api/${VERSION}/${API_BASE.MAP}/get-monthly-schedule/${date}?cursor=${pageParam}&pageSize=${pageSize}`; @@ -135,7 +128,6 @@ const updateDiary = (diaryId, postData) => { }; export { - loadMonthlySchedule, saveJourney, updateJourney, deleteJourney, diff --git a/src/apis/request/map.js b/src/apis/request/map.js index 04f320a4..971a23bf 100644 --- a/src/apis/request/map.js +++ b/src/apis/request/map.js @@ -1,5 +1,5 @@ import { axiosWithToken } from '../api'; -import { API_BASE, API_URL, VERSION } from '@/constants/path'; +import { API_BASE, VERSION } from '@/constants/path'; // 토큰이 필요 없는 경우 axios를 사용하면 됩니다. // 월별 여정 불러오기 @@ -24,13 +24,4 @@ const getDiaryMap = ({ journeyId }) => { return res; }; -// 세부 여정 확인하기 (지도) -const getDetailJourneyMap = journeyId => { - const url = `/api/${VERSION}/${API_BASE.MAP}/get-schedules/${journeyId}`; - const res = axiosWithToken.get(url); - return res; -}; - -// 토큰이 필요한 경우 axiosWithToken을 사용하면 됩니다. - -export { getMonthlyJourney, getJourneyMap, getDiaryMap, getDetailJourneyMap }; +export { getMonthlyJourney, getJourneyMap, getDiaryMap }; diff --git a/src/apis/request/mate.js b/src/apis/request/mate.js index 64ef15e6..0ed8bb69 100644 --- a/src/apis/request/mate.js +++ b/src/apis/request/mate.js @@ -62,13 +62,6 @@ const getSearchNickname = (searchTerm, take, { pageParam }) => { return axiosWithToken.get(url); }; -const getParticipateTeamMate = () => { - // GET_PARTICIPATE_TEAM_MATE: `/api/${VERSION}/${API_BASE.MATE}/rule/participants/:ruleId`, - // 백엔드 API : api/v1/mate/rule/participants/:ruleId - const url = `${API_URL.GET_PARTICIPATE_TEAM_MATE}`; - return axiosWithToken.get(url); -}; - // 여행 규칙 확인하기 (게시글) const getTeamMateRulePost = ruleId => { // GET_TEAM_MATE_RULE: `/api/${VERSION}/${API_BASE.MATE}/rule/view/:ruleId`, @@ -83,16 +76,6 @@ const getTeamMateRuleComment = (ruleId, take, { pageParam }) => { return axiosWithToken.get(url); }; -const patchTeamMateRule = () => { - // UPDATE_TEAM_MATE_RULE: `/api/${VERSION}/${API_BASE.MATE}/rule/edit/:ruleId`, - // 백엔드 API : api/v1/mate/rule/edit/:ruleId - const url = `${API_URL.UPDATE_TEAM_MATE_RULE}`; - return axiosWithToken.patch(url, { - title: title, - contents: contents, - }); -}; - const deleteTeamMate = () => { // DELETE_TEAM_MATE: `/api/${VERSION}/${API_BASE.MATE}/rule/editMate/:ruleId/:userId`, // 백엔드 API : api/v1/mate/rule/editMate/:ruleId/:mateId @@ -158,10 +141,8 @@ export { postCreateMateRule, getSearchInviteMate, getSearchNickname, - getParticipateTeamMate, getTeamMateRulePost, getTeamMateRuleComment, - patchTeamMateRule, getLocationMate, deleteTeamMate, postMateRuleComment, diff --git a/src/apis/request/preview.js b/src/apis/request/preview.js deleted file mode 100644 index 424e1ade..00000000 --- a/src/apis/request/preview.js +++ /dev/null @@ -1,11 +0,0 @@ -import { axios, axiosWithToken } from '../api'; -import { API_PATH } from '@/constants/path'; - -// 토큰이 필요없는 경우 axios를 쓰면됩니다. -const getSignaturePreview = () => { - return axios.get(API_PATH.SIGNATURE_PREVIEW); -}; - -// 토큰이 필요한 경우 axios대신, axiosWithToken을 사용하면 됩니다. - -export { getSignaturePreview }; diff --git a/src/apis/request/travel.js b/src/apis/request/travel.js deleted file mode 100644 index fe9df6a2..00000000 --- a/src/apis/request/travel.js +++ /dev/null @@ -1,11 +0,0 @@ -import { axios, axiosWithToken } from '../api'; -import { API_PATH } from '@/constants/path'; - -// 토큰이 필요없는 경우 axios를 쓰면됩니다. -const getFavoriteTravelPlace = () => { - return axios.get(API_PATH.FAVORITE_TRAVELS); -}; - -// 토큰이 필요한 경우 axios대신, axiosWithToken을 사용하면 됩니다. - -export { getFavoriteTravelPlace }; diff --git a/src/hooks/home/useDetailJourneyMap.js b/src/hooks/home/useDetailJourneyMap.js deleted file mode 100644 index 8674acb6..00000000 --- a/src/hooks/home/useDetailJourneyMap.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getDetailJourneyMap } from '@/apis/request/map'; - -export const useDetailJourneyMap = journeyId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getDetailJourneyMap({ journeyId }); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/home/useGetDetailJourney.js b/src/hooks/home/useGetDetailJourney.js deleted file mode 100644 index cc712605..00000000 --- a/src/hooks/home/useGetDetailJourney.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getDetailJourneyMap } from '@/apis/request/map'; - -export const useGetDetailJourneyMap = journeyId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getDetailJourneyMap(journeyId); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/home/useLoadMonthlyJourney.js b/src/hooks/home/useLoadMonthlyJourney.js deleted file mode 100644 index f90a65ec..00000000 --- a/src/hooks/home/useLoadMonthlyJourney.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { loadMonthlySchedule } from '@/apis/request/home'; - -export const useLoadMonthlyJourney = (year, month) => { - console.log(year, month); - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await loadMonthlySchedule(year, month); - const data = res.data.data; - setData(data); - } catch (e) { - console.log(e); - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useExploreMate.js b/src/hooks/mate/useExploreMate.js deleted file mode 100644 index 6a35c709..00000000 --- a/src/hooks/mate/useExploreMate.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getExploreMate } from '@/apis/request/mate'; - -export const useExploreMate = userId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getExploreMate(userId); - console.log(res); - const data = res.data.data.recommend_mates; - console.log(data); - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [userId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useMateProfileSearch.js b/src/hooks/mate/useMateProfileSearch.js deleted file mode 100644 index 5eb861c2..00000000 --- a/src/hooks/mate/useMateProfileSearch.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getMateProfile } from '@/apis/request/mate'; - -export const useMateProfileSearch = userId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getMateProfile(userId); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [userId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useParticipateTeamMate.js b/src/hooks/mate/useParticipateTeamMate.js deleted file mode 100644 index 759045ea..00000000 --- a/src/hooks/mate/useParticipateTeamMate.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getParticipateTeamMate } from '@/apis/request/mate'; - -export const useParticipateTeamMate = ruleId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getParticipateTeamMate(ruleId); - const data = res.data.data.mates; - console.log(data); - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [ruleId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useSearchMate.js b/src/hooks/mate/useSearchMate.js deleted file mode 100644 index 9f3751a3..00000000 --- a/src/hooks/mate/useSearchMate.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getSearchMate } from '@/apis/request/mate'; - -export const useSearchMate = (searchTerm, cursor, take) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getSearchMate(searchTerm, cursor, take); - console.log(res.data); - const data = res.data.data.mates; - - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [searchTerm, cursor, take]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useTeamMateRuleComment.js b/src/hooks/mate/useTeamMateRuleComment.js deleted file mode 100644 index 454c8a99..00000000 --- a/src/hooks/mate/useTeamMateRuleComment.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getTeamMateRuleComment } from '@/apis/request/mate'; - -export const useTeamMateRuleComment = (ruleId, cursor, take) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getTeamMateRuleComment(ruleId, cursor, take); - const data = res.data.data; - - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [ruleId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useTeamRuleList.js b/src/hooks/mate/useTeamRuleList.js deleted file mode 100644 index 5673c859..00000000 --- a/src/hooks/mate/useTeamRuleList.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getTeamRuleList } from '@/apis/request/mate'; - -export const useTeamRuleList = () => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getTeamRuleList(); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useDeleteMySignature.js b/src/hooks/signature/useDeleteMySignature.js deleted file mode 100644 index 1eefc6fb..00000000 --- a/src/hooks/signature/useDeleteMySignature.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { deleteMySignature } from '@/apis/request/signature'; - -// 시그니처 삭제하기 -export const useDeleteMySignature = signatureId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await deleteMySignature(signatureId); - const data = res.data.data; - console.log(res); - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useLikeSignature.js b/src/hooks/signature/useLikeSignature.js deleted file mode 100644 index 1c4c6ea8..00000000 --- a/src/hooks/signature/useLikeSignature.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { likeSignature } from '@/apis/request/signature'; - -// 시그니처 좋아요 -export const useLikeSignature = signatureId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await likeSignature(signatureId); - const data = res.data.data; - console.log(res); - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/usePostNewSignature .js b/src/hooks/signature/usePostNewSignature .js deleted file mode 100644 index 116b6236..00000000 --- a/src/hooks/signature/usePostNewSignature .js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { postNewSignature } from '@/apis/request/signature'; - -//시그니처 발행하기 -export const usePostNewSignature = postData => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await postNewSignature({ postData }); - const data = res.data.data; - - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useUpdateMySignature.js b/src/hooks/signature/useUpdateMySignature.js deleted file mode 100644 index 95a9a414..00000000 --- a/src/hooks/signature/useUpdateMySignature.js +++ /dev/null @@ -1,31 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { updateMySignature } from '@/apis/request/signature'; - -//시그니처 수정하기 -export const useUpdateMySignature = (signatureId, { patchData }) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await updateMySignature(signatureId, { patchData }); - const data = res.data.data; - console.log(res); - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; -s; diff --git a/src/pages/signature/SignaturePage.jsx b/src/pages/signature/SignaturePage.jsx index 5fe9a3df..210b401d 100644 --- a/src/pages/signature/SignaturePage.jsx +++ b/src/pages/signature/SignaturePage.jsx @@ -3,7 +3,6 @@ import React, { useEffect, useState } from 'react'; 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 useSignatureWrite from '@/store/useSignatureWrite'; From 42f3c90bf20b70eb23317e9880c3e388c67d8330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sat, 17 Feb 2024 16:25:04 +0900 Subject: [PATCH 02/52] =?UTF-8?q?feat:=20footer=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/footer/Footer.style.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/footer/Footer.style.js b/src/components/footer/Footer.style.js index 0a6106cf..1908522c 100644 --- a/src/components/footer/Footer.style.js +++ b/src/components/footer/Footer.style.js @@ -6,8 +6,7 @@ import theme from '@/theme'; const FooterWrapper = styled.div` width: 100%; height: 80px; - position: fixed; - bottom: 0px; + background-color: ${theme.COLOR.MAIN.WHITE}; color: ${theme.COLOR.MAIN.BLACK}; From bd26abbbac1bc872d1f593453fed084288f27ab8 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 16:57:41 +0900 Subject: [PATCH 03/52] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=ED=8E=AD?= =?UTF-8?q?=EC=A7=80=20=EB=B9=84=ED=96=89=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/airplane.svg | 9 ++ public/images/background.svg | 18 ++++ src/mocks/handlers/signature.js | 181 ++++++++++++++------------------ src/pages/login/Login.jsx | 3 +- src/pages/login/Login.style.js | 56 ++++++++-- 5 files changed, 156 insertions(+), 111 deletions(-) create mode 100644 public/images/airplane.svg create mode 100644 public/images/background.svg diff --git a/public/images/airplane.svg b/public/images/airplane.svg new file mode 100644 index 00000000..dfa0a485 --- /dev/null +++ b/public/images/airplane.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/images/background.svg b/public/images/background.svg new file mode 100644 index 00000000..86f527d3 --- /dev/null +++ b/public/images/background.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/mocks/handlers/signature.js b/src/mocks/handlers/signature.js index 63bf0092..b4e4b178 100644 --- a/src/mocks/handlers/signature.js +++ b/src/mocks/handlers/signature.js @@ -7,78 +7,70 @@ export const SignatureHandlers = [ //시그니처_내 시그니처 http.get(`${baseURL}${API_URL.GET_MY_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ - timestamp: '2024-02-03T08:18:18.076Z', - code: 'OK', + status: 200, success: true, - message: '내 시그니처 가져오기 성공', + message: '내 시그니처 조회 성공', data: [ { - _id: 1, - title: '호주와 겨룬 8강전 직관 후기', - date: '2024-02-03T08:03:22.000Z', + 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: 2, - title: '강남역 근처 카페 모음', - date: '2024-02-03T08:14:40.000Z', + 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', }, + ], + }); + }), + + //시그니처_발행하기 + http.post(`${baseURL}${API_URL.PUBLISH_SIGNATURE}`, ({ request, params }) => { + return HttpResponse.json({ + title: '새로운 시그니처 제목', + pages: [ { - _id: 3, - title: '호주와 겨룬 8강전 직관 후기', - date: '2024-02-03T08:03:22.000Z', + 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', }, { - _id: 4, - title: '강남역 근처 카페 모음', - date: '2024-02-03T08:14:40.000Z', + 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', }, { - _id: 5, - title: '호주와 겨룬 8강전 직관 후기', - date: '2024-02-03T08:03:22.000Z', + 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', }, { - _id: 6, - title: '강남역 근처 카페 모음', - date: '2024-02-03T08:14:40.000Z', + content: '저는 원래 호수 산책을 참 좋아하는데요 어쩌구', + location: '동백 호수 공원', + page: 4, 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', }, ], }); }), - - //시그니처_발행하기 - http.post(`${baseURL}${API_URL.PUBLISH_SIGNATURE}`, ({ request, params }) => { - return HttpResponse.json({ - timestamp: '2024-02-03T08:14:40.451Z', - code: 'CREATED', - success: true, - message: '시그니처 기록하기 성공', - data: 2, - }); - }), - //시그니처_시그니처 상세보기 //내 시그니처 Response-Body X, 다른 사람의 시그니처 Response-Body 만 O //내가 작성한 거 추가해야함 http.get( `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}`, ({ request, params }) => { - const signatureId = params.signatureId; - if (!signatureId) { - return new HttpResponse(null, { status: 404 }); - } return HttpResponse.json({ status: 200, success: true, @@ -100,36 +92,27 @@ export const SignatureHandlers = [ }, pages: [ { - _id: 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', + image: 'image_url', location: '리라쿠마 카페, 긴자', content: '초등학교때부터 가고 싶었던 리락쿠마 카페를 다녀왔어요.', page: 1, }, { - _id: 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', - location: '서울, 강동', - content: '강동강동강동강동강동강동', + image: 'image_url', + location: '리라쿠마 카페, 긴자', + content: '초등학교때부터 가고 싶었던 리락쿠마 카페를 다녀왔어요.', page: 2, }, { - _id: 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', - location: '경기도, 안산', - content: '안산시안산시안산시안산시', + image: 'image_url', + location: '리라쿠마 카페, 긴자', + content: '초등학교때부터 가고 싶었던 리락쿠마 카페를 다녀왔어요.', page: 3, }, { - _id: 4, - 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', - location: '서울, 강남', - content: - '강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남강남', + image: 'image_url', + location: '리라쿠마 카페, 긴자', + content: '초등학교때부터 가고 싶었던 리락쿠마 카페를 다녀왔어요.', page: 4, }, ], @@ -139,34 +122,57 @@ export const SignatureHandlers = [ ), //시그니처_시그니처 수정하기 - http.patch( + http.post( `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ - timestamp: '2024-02-05T07:37:55.770Z', - code: 'OK', - success: true, - message: '시그니처 수정하기 성공', - data: '6', + title: '새로운 시그니처 제목', + pages: [ + { + 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: '동백 호수 공원', + 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: '광교 호수 공원', + 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', + }, + { + content: '저는 원래 호수 산책을 참 좋아하는데요 어쩌구', + location: '동백 호수 공원', + page: 4, + 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', + }, + ], }); }, ), - //시그니처_시그니처 삭제하기 http.delete( `${baseURL}${API_URL.GET_DETAIL_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ - timestamp: '2024-02-05T07:40:21.691Z', - code: 'OK', + status: 204, success: true, - message: '시그니처 삭제 성공', - data: null, + message: '시그니처 삭제하기 성공', }); }, ), - //시그니처_시그니처 좋아요, 좋아요 취소 + //좋아요만 -> 좋아요 취소 추가해야함 http.patch(`${baseURL}${API_URL.LIKE_SIGNATURE}`, ({ request, params }) => { return HttpResponse.json({ timestamp: '2024-02-03T07:07:13.749Z', @@ -180,39 +186,8 @@ export const SignatureHandlers = [ }); }), - //시그니처_시그니처 좋아요한 사용자 목록 - http.get(`${baseURL}${API_URL.LIKELIST_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, - }, - ], - }, - }); - }), + //시그니처_시그니처 좋아요한 사용자 목록 (API명세서 미완성) + // http.get(`${baseURL}${API_URL.LIKE_SIGNATURE}`, ({ request, params }) => { + // return HttpResponse.json(); + // }), ]; diff --git a/src/pages/login/Login.jsx b/src/pages/login/Login.jsx index f03c4eba..788e4e0e 100644 --- a/src/pages/login/Login.jsx +++ b/src/pages/login/Login.jsx @@ -2,6 +2,7 @@ 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'; @@ -36,7 +37,7 @@ const LoginPage = () => { return ( - +
diff --git a/src/pages/login/Login.style.js b/src/pages/login/Login.style.js index e9ce1dcb..0f75c67f 100644 --- a/src/pages/login/Login.style.js +++ b/src/pages/login/Login.style.js @@ -2,6 +2,46 @@ import styled, { keyframes } from 'styled-components'; import theme from '@/theme'; +const airplaneAnimation = keyframes` + 0% { + transform: translateX(-100%) translateY(40px) rotate(0deg); + opacity: 1; + } + + 30% { + transform: translateX(100%) translateY(-50px) rotate(0deg); + opacity: 1; + } + 40% { + transform: translateX(250%) translateY(-50px) rotate(-100deg); + opacity: 1; + } + 60% { + transform: translateX(-100%) translateY(-150px) rotate(-100deg); + opacity: 1; + + } + 70%{ + opacity:0; + transform: translateX(-100%) translateY(-150px) rotate(-100deg); + } + 100% { + opacity: 0; + + transform: translateX(-100%) translateY(-150px) rotate(-100deg); + } + +`; + +const rotate360 = keyframes` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`; + const fadeIn = keyframes` from { opacity: 0; @@ -15,21 +55,23 @@ const LoginContainer = styled.div` ${theme.ALIGN.COLUMN_CENTER}; justify-content: space-evenly; height: 100%; + /* background-image: url('/images/background.svg'); + background-size: cover; + background-position: center; */ +`; +const AirPlane = styled.img` + width: 200px; + animation: ${airplaneAnimation} 3s linear forwards; `; const LogoImg = styled.img` width: 65%; - margin-bottom: 100px 0px 200px 0px; + margin-top: 20px; animation: ${fadeIn} 1s ease-in-out; `; -const LoginButtonWrapper = styled.div` - display: flex; - width: 100%; -`; const ButtonWrap = styled.div` width: 70%; - margin-top: 150px; `; -export { LoginContainer, LoginButtonWrapper, LogoImg, ButtonWrap }; +export { LoginContainer, LogoImg, ButtonWrap, AirPlane }; From 1cb99528a3783bf5c87a18767150d48552b774e4 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 17:05:21 +0900 Subject: [PATCH 04/52] =?UTF-8?q?Fix=20:=20=EB=A9=94=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EB=A9=98=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mate/main/MateMain.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/mate/main/MateMain.jsx b/src/pages/mate/main/MateMain.jsx index c3e54ea1..9eb2bb1f 100644 --- a/src/pages/mate/main/MateMain.jsx +++ b/src/pages/mate/main/MateMain.jsx @@ -51,8 +51,7 @@ const MateMainPage = () => { return ( - 여행의 이유를 함께 찾아줄 친구를 - ID로 추가해보세요! + 여행의 이유를 함께 찾아볼 친구를 추가해보세요! From e1f1fa1982a086728032de7ad48c0208ffef81bd Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 17:16:24 +0900 Subject: [PATCH 05/52] =?UTF-8?q?Style=20:=20=EC=BA=98=EB=A6=B0=EB=8D=94,?= =?UTF-8?q?=20=EB=A7=B5=20margin=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/banner/Banner.style.js | 2 +- src/components/calendar/TravelCalendar.style.js | 3 +-- src/components/mate/Search.jsx | 2 +- src/pages/map/Map.style.js | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/banner/Banner.style.js b/src/components/banner/Banner.style.js index aa64a5fd..009a0f70 100644 --- a/src/components/banner/Banner.style.js +++ b/src/components/banner/Banner.style.js @@ -8,7 +8,7 @@ const BannerContainer = styled.div` justify-content: center; padding: 5%; width: 100%; - height: 160px; + height: 130px; background: rgba(27, 156, 133, 0.16); `; diff --git a/src/components/calendar/TravelCalendar.style.js b/src/components/calendar/TravelCalendar.style.js index 9364eb48..5a5d6ca7 100644 --- a/src/components/calendar/TravelCalendar.style.js +++ b/src/components/calendar/TravelCalendar.style.js @@ -19,12 +19,11 @@ const Wrapper = styled.div` flex-direction: column; justify-content: center; align-items: center; - margin: 20px 0; `; const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 40px; + margin-top: 30px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; diff --git a/src/components/mate/Search.jsx b/src/components/mate/Search.jsx index 1e28aac2..3cce94af 100644 --- a/src/components/mate/Search.jsx +++ b/src/components/mate/Search.jsx @@ -5,7 +5,7 @@ const Search = ({ setSearchTerm }) => { setSearchTerm(e.target.value)} /> diff --git a/src/pages/map/Map.style.js b/src/pages/map/Map.style.js index 8080f73a..51cf1f1e 100644 --- a/src/pages/map/Map.style.js +++ b/src/pages/map/Map.style.js @@ -24,7 +24,6 @@ const AddButton = styled.button` position: sticky; bottom: 20px; margin-right: -80px; - cursor: pointer; z-index: 1; align-self: flex-end; @@ -32,7 +31,7 @@ const AddButton = styled.button` const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 40px; + margin-top: 30px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; `; From 2fc3221a1cd4defb799301f45f6593754ce47365 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 17:18:36 +0900 Subject: [PATCH 06/52] =?UTF-8?q?Style=20:=20=EC=BA=98=EB=A6=B0=EB=8D=94,?= =?UTF-8?q?=20=EB=A7=B5=20margin=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/map/Map.style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/map/Map.style.js b/src/pages/map/Map.style.js index 51cf1f1e..3e3ae738 100644 --- a/src/pages/map/Map.style.js +++ b/src/pages/map/Map.style.js @@ -56,7 +56,7 @@ const Button = styled.button` } @media ${theme.WINDOW_SIZE.MOBILE} { - width: 150px; + width: 140px; } `; From 734e637bc8cd335abd252ecd4ef0037e635c593f Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 17:31:57 +0900 Subject: [PATCH 07/52] =?UTF-8?q?Fix=20:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=95=88=20=ED=96=88=EC=9D=84=20=EB=95=8C=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=20=EB=B9=A8=EA=B0=84=EC=83=89=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/navbar/Navbar.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/navbar/Navbar.jsx b/src/components/navbar/Navbar.jsx index 5a6e4c6f..eee4c57c 100644 --- a/src/components/navbar/Navbar.jsx +++ b/src/components/navbar/Navbar.jsx @@ -1,3 +1,5 @@ +import { useEffect } from 'react'; + import * as S from './Navbar.style'; import Bell from '/images/Bell.svg'; import User from '/images/User.svg'; @@ -6,9 +8,9 @@ import { useUnReadNotification } from '@/hooks/notification/useGetNotification'; import useAuth from '@/store/useAuth'; const Navbar = () => { - const { isAuth } = useAuth(); const { data: unReadCount, isPending, isError } = useUnReadNotification(); const unReadCounter = unReadCount?.data?.data?.unreadCount; + return ( @@ -20,7 +22,8 @@ const Navbar = () => { - {unReadCounter === 0 ? null :

{unReadCounter}

} + + {!unReadCounter ? null :

{unReadCounter}

}
From bf5a387fc068ad7b70869a797c8809b81ecc22e9 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 18:00:47 +0900 Subject: [PATCH 08/52] =?UTF-8?q?Fix=20:=20=EB=A9=94=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mate/commentInput/MateCommentInput.style.js | 2 +- src/components/mate/TeamContainer.style.js | 4 ++-- src/pages/mate/ruleCheck/MateRuleCheck.style.js | 2 +- .../mate/ruleCheck/MateRuleDetailCheck.style.js | 12 ++++++------ src/pages/mate/ruleEdit/RuleEdit.jsx | 2 +- src/pages/mate/ruleEdit/RuleEdit.style.js | 11 ++++++++--- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/components/comment/mate/commentInput/MateCommentInput.style.js b/src/components/comment/mate/commentInput/MateCommentInput.style.js index 1651d76d..e0957183 100644 --- a/src/components/comment/mate/commentInput/MateCommentInput.style.js +++ b/src/components/comment/mate/commentInput/MateCommentInput.style.js @@ -36,7 +36,7 @@ const SubmitButton = styled.button` border-radius: 10px; background-color: ${theme.COLOR.MAIN.MEDIUM_GREEN}; color: ${theme.COLOR.MAIN.WHITE}; - padding: 5px; + padding: 5px 11px; outline: none; cursor: pointer; `; diff --git a/src/components/mate/TeamContainer.style.js b/src/components/mate/TeamContainer.style.js index cf613c2b..3f5f9250 100644 --- a/src/components/mate/TeamContainer.style.js +++ b/src/components/mate/TeamContainer.style.js @@ -89,11 +89,11 @@ const TeamTitle = styled.span` margin-right: auto; color: #000; text-align: center; - font-size: 22px; + font-size: 20px; font-style: normal; font-weight: 600; line-height: normal; - + font-family: 'Pretendard-semibold'; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/src/pages/mate/ruleCheck/MateRuleCheck.style.js b/src/pages/mate/ruleCheck/MateRuleCheck.style.js index 7745015d..fcfc5a01 100644 --- a/src/pages/mate/ruleCheck/MateRuleCheck.style.js +++ b/src/pages/mate/ruleCheck/MateRuleCheck.style.js @@ -23,7 +23,7 @@ const StyledTitle = styled.span` margin-bottom: 35px; @media ${theme.WINDOW_SIZE.MOBILE} { - font-size: 12px; + font-size: 18px; } `; diff --git a/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js b/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js index 7411910c..1640bcc8 100644 --- a/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js +++ b/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js @@ -9,9 +9,9 @@ const Container = styled.div` const Wrapper = styled.div` width: 80%; - height: 900px; + height: 60vh; overflow-y: scroll; - + margin-top: 40px; border: 2px solid ${theme.COLOR.MAIN.HEAVY_GREEN}; border-radius: 20px; padding: 20px; @@ -49,12 +49,12 @@ const Title = styled.h1` const ProfileContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; + width: 100%; `; const ProfileBox = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - margin-right: 10px; - + margin: 0px 4px; h3 { font-size: ${FONT_SIZE.XS}; white-space: nowrap; @@ -63,8 +63,8 @@ const ProfileBox = styled.div` const ProfileImages = styled.img` border-radius: 50%; - width: 40px; - height: 40px; + width: 30px; + height: 30px; margin-bottom: 10px; object-fit: cover; `; diff --git a/src/pages/mate/ruleEdit/RuleEdit.jsx b/src/pages/mate/ruleEdit/RuleEdit.jsx index 960d871b..d916195d 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.jsx +++ b/src/pages/mate/ruleEdit/RuleEdit.jsx @@ -156,7 +156,7 @@ const RuleEditPage = () => { )} - 수정하기 + 저장하기 ); }; diff --git a/src/pages/mate/ruleEdit/RuleEdit.style.js b/src/pages/mate/ruleEdit/RuleEdit.style.js index f40e2310..81074446 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.style.js +++ b/src/pages/mate/ruleEdit/RuleEdit.style.js @@ -5,11 +5,13 @@ import theme from '@/theme'; const Container = styled.div` ${theme.ALIGN.COLUMN_CENTER}; + width: 100%; + height: 100%; `; const Wrapper = styled.div` width: 80%; - height: 900px; + height: 80%; overflow-y: scroll; border: 2px solid ${theme.COLOR.MAIN.HEAVY_GREEN}; @@ -27,7 +29,7 @@ const Wrapper = styled.div` const Header = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - gap: 20px; + gap: 3px; h1 { ${theme.ALIGN.ROW_CENTER}; @@ -54,8 +56,11 @@ const PlusSvg = styled.img` `; const MatesContainer = styled.div` - ${theme.ALIGN.ROW_CENTER}; + display: flex; gap: 2px; + width: 90%; + overflow: scroll; + flex: flex-end; `; const MatesImages = styled.img` From 4d65b3ea98c4de1c4261a5d1641be8888d3d9c83 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 18:11:28 +0900 Subject: [PATCH 09/52] =?UTF-8?q?Style=20:=20=EC=A7=80=EB=8F=84=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=B4=EA=B8=B0=20=EB=86=92=EC=9D=B4=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/bottomSheet/BottomScrollPage.style.js | 4 ++-- src/pages/map/Map.style.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/bottomSheet/BottomScrollPage.style.js b/src/components/bottomSheet/BottomScrollPage.style.js index 58f9bbb2..b1fff1c3 100644 --- a/src/components/bottomSheet/BottomScrollPage.style.js +++ b/src/components/bottomSheet/BottomScrollPage.style.js @@ -12,11 +12,11 @@ const Button = styled.button` background-color: ${theme.COLOR.MAIN.GREEN}; border: none; width: 200px; - height: 50px; + height: 70px; color: ${theme.COLOR.MAIN.WHITE}; border-radius: 20px; margin: auto; - margin-top: 10px; + margin-top: 15px; cursor: pointer; font-size: ${FONT_SIZE.XL}; diff --git a/src/pages/map/Map.style.js b/src/pages/map/Map.style.js index 3e3ae738..8da4623a 100644 --- a/src/pages/map/Map.style.js +++ b/src/pages/map/Map.style.js @@ -67,7 +67,10 @@ const CalendarContainer = styled.div` const JourneyWrapper = styled.div``; const MapContainer = styled.div` - width: 90%; + width: 80%; + display: flex; + flex-direction: Column; + height: 65vh; margin-top: 40px; `; From 36aed1038fa6d132e72495f881220b5f306a6abc Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 19:13:11 +0900 Subject: [PATCH 10/52] =?UTF-8?q?Style=20:=20=EC=BA=98=EB=A6=B0=EB=8D=94,?= =?UTF-8?q?=20=EB=A7=B5=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/TravelCalendar.jsx | 20 ++++++++++++++++ .../calendar/TravelCalendar.style.js | 24 ++++++++++++------- src/index.css | 11 +++++---- src/pages/home/Home.style.js | 2 +- src/pages/map/Map.style.js | 6 ++--- 5 files changed, 46 insertions(+), 17 deletions(-) diff --git a/src/components/calendar/TravelCalendar.jsx b/src/components/calendar/TravelCalendar.jsx index a972b4f3..f2cd036c 100644 --- a/src/components/calendar/TravelCalendar.jsx +++ b/src/components/calendar/TravelCalendar.jsx @@ -178,6 +178,26 @@ const TravelCalendar = ({ { + switch (date.getDay()) { + case 0: + return 'S'; + case 1: + return 'M'; + case 2: + return 'T'; + case 3: + return 'W'; + case 4: + return 'T'; + case 5: + return 'F'; + case 6: + return 'S'; + default: + return ''; + } + }} locale="en" tileClassName={tileClassName} onChange={changeDate} diff --git a/src/components/calendar/TravelCalendar.style.js b/src/components/calendar/TravelCalendar.style.js index 5a5d6ca7..b7a58644 100644 --- a/src/components/calendar/TravelCalendar.style.js +++ b/src/components/calendar/TravelCalendar.style.js @@ -23,7 +23,7 @@ const Wrapper = styled.div` const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 30px; + margin-top: 10px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; @@ -35,7 +35,7 @@ const ButtonContainer = styled.div` const Button = styled.button` width: 200px; background-color: #ffffff; - padding: 20px; + padding: 10px; border: ${props => props.$clicked ? `2px solid ${theme.COLOR.MAIN.GREEN}` : 'none'}; color: ${props => @@ -58,7 +58,8 @@ const HeaderWrapper = styled.div` flex-direction: row; justify-content: center; align-items: center; - height: 200px; + height: 60px; + margin-top: 20px; gap: 120px; margin-bottom: 20px; @@ -72,7 +73,7 @@ const HeaderWrapper = styled.div` } @media (max-width: 600px) { - gap: 80px; + gap: 120px; h1 { font-size: 50px; } @@ -88,16 +89,20 @@ const FontWrapper = styled.div` -webkit-transform: rotate(90deg); // Chrome Safari Opera color: #1c1c1c; - font-size: 25px; + font-size: 15px; font-weight: bold; `; const CircleWrapper = styled.div` display: flex; + font-family: 'Pretenard-bold'; + h1 { + font-size: 30px; + } `; const Circle = styled.div` - width: 120px; - height: 120px; + width: 40px; + height: 40px; border-radius: 50%; background-color: black; `; @@ -109,6 +114,7 @@ const HomeContentContainer = styled.div` const SchedulesContainer = styled.div` max-height: 400px; + padding: 0 30px; &::-webkit-scrollbar { @@ -125,8 +131,7 @@ const SchedulesContainer = styled.div` const IntroductionContainer = styled.div` display: flex; flex-direction: column; - gap: 20px; - + gap: 10px; width: 90%; padding: 20px; background-color: ${theme.COLOR.MAIN.LIGHT_GREEN}; @@ -177,6 +182,7 @@ const Image = styled.img` const CalendarContainer = styled.div` position: relative; + color: black; `; const PrevBtn = styled.button` diff --git a/src/index.css b/src/index.css index 70dd3ff9..5e2be8cf 100644 --- a/src/index.css +++ b/src/index.css @@ -101,7 +101,7 @@ width: 300px; max-width: 100%; border: none; - line-height: 1.125em; + line-height: 1em; @media (min-width: 640px) { width: 500px; @@ -112,7 +112,9 @@ display: flex; justify-content: center; align-items: center; - justify-content: center; + + margin-left: 5%; + width: 100%; } .react-calendar__navigation__label > span { @@ -156,17 +158,18 @@ position: absolute; bottom: 0px; content: 'TODAY'; - font-family: 900; background-color: gold; border-radius: 10px; padding: 2px 8px; + font-size: 10px; } /* 일자 */ .react-calendar__tile { text-align: center; position: relative; - height: 80px; + height: 50px; + color: black; display: flex; flex-direction: column; justify-content: center; diff --git a/src/pages/home/Home.style.js b/src/pages/home/Home.style.js index 966a7186..051a6f1a 100644 --- a/src/pages/home/Home.style.js +++ b/src/pages/home/Home.style.js @@ -41,7 +41,6 @@ const Button = styled.button` color: ${props => props.clicked ? `${theme.COLOR.MAIN.GREEN}` : `${theme.COLOR.MAIN.GRAY}`}; font-size: ${FONT_SIZE.SM}; - font-weight: ${props => (props.clicked ? 'bold' : 'none')}; border-radius: 40px; cursor: pointer; @@ -58,6 +57,7 @@ const CalendarContainer = styled.div` const JourneyButtonContainer = styled.div` position: relative; + display: flex; flex-direction: row; diff --git a/src/pages/map/Map.style.js b/src/pages/map/Map.style.js index 8da4623a..827df1d3 100644 --- a/src/pages/map/Map.style.js +++ b/src/pages/map/Map.style.js @@ -31,7 +31,7 @@ const AddButton = styled.button` const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 30px; + margin-top: 10px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; `; @@ -39,13 +39,13 @@ const ButtonContainer = styled.div` const Button = styled.button` width: 200px; background-color: #ffffff; - padding: 20px; + padding: 10px; border: ${props => props.$clicked ? `2px solid ${theme.COLOR.MAIN.GREEN}` : 'none'}; color: ${props => props.$clicked ? `${theme.COLOR.MAIN.GREEN}` : `${theme.COLOR.MAIN.GRAY}`}; font-size: ${FONT_SIZE.SM}; - font-weight: ${props => (props.$clicked ? 'bold' : 'none')}; + border-radius: 40px; cursor: pointer; From 572e6599ebeaa166dea465693d9a0ca1e34c375b Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 19:28:14 +0900 Subject: [PATCH 11/52] =?UTF-8?q?Style=20:=20=EC=BA=98=EB=A6=B0=EB=8D=94,?= =?UTF-8?q?=20=EC=A7=80=EB=8F=84=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.css | 20 ++++++++++---------- src/utils/randomColor.js | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/index.css b/src/index.css index 5e2be8cf..c8864fc2 100644 --- a/src/index.css +++ b/src/index.css @@ -98,13 +98,13 @@ /* REACT_CALENDAR */ .react-calendar { - width: 300px; + width: 250px; + max-width: 100%; border: none; - line-height: 1em; @media (min-width: 640px) { - width: 500px; + width: 400px; } } @@ -147,9 +147,9 @@ border-radius: 50%; @media (min-width: 640px) { - font-size: 22px; - width: 60px; - height: 60px; + font-size: 20px; + width: 50px; + height: 50px; } } } @@ -186,13 +186,13 @@ abbr { text-decoration: none; - width: 60px; - height: 60px; - border-radius: 50%; + width: 40px; + height: 40px; + border-radius: 100%; display: flex; justify-content: center; align-items: center; - border-radius: 50%; + border-radius: 100%; border: 2px solid black !important; @media (max-width: 600px) { diff --git a/src/utils/randomColor.js b/src/utils/randomColor.js index 4a0021c7..a958facf 100644 --- a/src/utils/randomColor.js +++ b/src/utils/randomColor.js @@ -8,14 +8,14 @@ export const generateCSSForID = (id, color) => ` width: 30px; height: 30px; - font-size: 18px; + font-size: 16px; border-radius: 50%; ${theme.ALIGN.COLUMN_CENTER} @media (min-width: 600px) { - font-size: 22px; - width: 60px; - height: 60px; + font-size: 18px; + width: 50px; + height: 50px; } } From 355e192cc8bea480e8fcd127960493e21462abc6 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 19:37:25 +0900 Subject: [PATCH 12/52] =?UTF-8?q?Style=20:=20=EC=BA=98=EB=A6=B0=EB=8D=94,?= =?UTF-8?q?=20=EC=A7=80=EB=8F=84=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/calendar/TravelCalendar.style.js | 4 ++-- src/index.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/calendar/TravelCalendar.style.js b/src/components/calendar/TravelCalendar.style.js index b7a58644..8dbcf9eb 100644 --- a/src/components/calendar/TravelCalendar.style.js +++ b/src/components/calendar/TravelCalendar.style.js @@ -41,7 +41,7 @@ const Button = styled.button` color: ${props => props.$clicked ? `${theme.COLOR.MAIN.GREEN}` : `${theme.COLOR.MAIN.GRAY}`}; font-size: ${FONT_SIZE.SM}; - font-weight: ${props => (props.$clicked ? 'bold' : 'none')}; + border-radius: 40px; cursor: pointer; @@ -132,7 +132,7 @@ const IntroductionContainer = styled.div` display: flex; flex-direction: column; gap: 10px; - width: 90%; + width: 100%; padding: 20px; background-color: ${theme.COLOR.MAIN.LIGHT_GREEN}; border-radius: 10px; diff --git a/src/index.css b/src/index.css index c8864fc2..e23610e4 100644 --- a/src/index.css +++ b/src/index.css @@ -98,7 +98,7 @@ /* REACT_CALENDAR */ .react-calendar { - width: 250px; + width: 290px; max-width: 100%; border: none; From e53844f25b5abc647b3b9942afbe69d5ca628346 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Sat, 17 Feb 2024 19:56:49 +0900 Subject: [PATCH 13/52] =?UTF-8?q?Fix=20:=20=EB=85=B8=EC=85=98=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/subcategory.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/constants/subcategory.js b/src/constants/subcategory.js index 465ce3b1..7940c993 100644 --- a/src/constants/subcategory.js +++ b/src/constants/subcategory.js @@ -36,21 +36,21 @@ const SUPPORT = [ id: 0, img: myPageImg.Question, title: '자주 묻는 질문', - link: 'https://www.notion.so/sally626/2364649c142d4ed6a65f8b8cc301a9a6?pvs=4', + link: 'https://sally626.notion.site/2364649c142d4ed6a65f8b8cc301a9a6', modal: false, }, { id: 1, img: myPageImg.Bug, title: '버그 및 오류 제보', - link: 'https://www.notion.so/sally626/c86010e2a9f448eea449f246115ee8a7?pvs=4', + link: 'https://sally626.notion.site/c86010e2a9f448eea449f246115ee8a7', modal: false, }, { id: 2, img: myPageImg.Chat, title: '의견 보내기', - link: 'https://www.notion.so/sally626/49fc0dfff6904eb9817d320eb7e4769d?pvs=4', + link: 'https://sally626.notion.site/49fc0dfff6904eb9817d320eb7e4769d', modal: false, }, ]; @@ -60,7 +60,7 @@ const ETC = [ id: 0, img: myPageImg.Sertificate, title: '개발자 소개', - link: 'https://www.notion.so/sally626/f566c3caed5747bb9a3fcfdc16b0857c?pvs=4', + link: 'https://sally626.notion.site/f566c3caed5747bb9a3fcfdc16b0857c', modal: false, }, // { From a87340ed2ea463dbb62cf302e0420ee41d4f51b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sat, 17 Feb 2024 20:12:12 +0900 Subject: [PATCH 14/52] =?UTF-8?q?feat:=20package.json=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 26695cd0..4e2747cc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "start": "vite start -p 80" + "start": "vite start -p 80", + "deploy": "aws s3 sync dist s3://here---you --profile=dydals3440" }, "dependencies": { "@googlemaps/react-wrapper": "^1.1.35", From 205e1d06bf928f6807d642aa659e6996e59c547b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sat, 17 Feb 2024 23:08:06 +0900 Subject: [PATCH 15/52] =?UTF-8?q?feat:=20=EB=B0=98=EC=9D=91=ED=98=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bottomSheet/BottomScrollPage.style.js | 8 ++-- src/components/calendar/TravelCalendar.jsx | 20 ---------- .../calendar/TravelCalendar.style.js | 29 ++++++--------- src/index.css | 37 +++++++++++-------- src/pages/map/Map.style.js | 14 +++---- 5 files changed, 43 insertions(+), 65 deletions(-) diff --git a/src/components/bottomSheet/BottomScrollPage.style.js b/src/components/bottomSheet/BottomScrollPage.style.js index b1fff1c3..655c869c 100644 --- a/src/components/bottomSheet/BottomScrollPage.style.js +++ b/src/components/bottomSheet/BottomScrollPage.style.js @@ -11,12 +11,12 @@ const Button = styled.button` ${theme.ALIGN.ROW_CENTER}; background-color: ${theme.COLOR.MAIN.GREEN}; border: none; - width: 200px; - height: 70px; + width: 400px; + height: 60px; color: ${theme.COLOR.MAIN.WHITE}; - border-radius: 20px; + border-radius: 30px; margin: auto; - margin-top: 15px; + margin-top: 10px; cursor: pointer; font-size: ${FONT_SIZE.XL}; diff --git a/src/components/calendar/TravelCalendar.jsx b/src/components/calendar/TravelCalendar.jsx index f2cd036c..a972b4f3 100644 --- a/src/components/calendar/TravelCalendar.jsx +++ b/src/components/calendar/TravelCalendar.jsx @@ -178,26 +178,6 @@ const TravelCalendar = ({ { - switch (date.getDay()) { - case 0: - return 'S'; - case 1: - return 'M'; - case 2: - return 'T'; - case 3: - return 'W'; - case 4: - return 'T'; - case 5: - return 'F'; - case 6: - return 'S'; - default: - return ''; - } - }} locale="en" tileClassName={tileClassName} onChange={changeDate} diff --git a/src/components/calendar/TravelCalendar.style.js b/src/components/calendar/TravelCalendar.style.js index 8dbcf9eb..9364eb48 100644 --- a/src/components/calendar/TravelCalendar.style.js +++ b/src/components/calendar/TravelCalendar.style.js @@ -19,11 +19,12 @@ const Wrapper = styled.div` flex-direction: column; justify-content: center; align-items: center; + margin: 20px 0; `; const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 10px; + margin-top: 40px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; @@ -35,13 +36,13 @@ const ButtonContainer = styled.div` const Button = styled.button` width: 200px; background-color: #ffffff; - padding: 10px; + padding: 20px; border: ${props => props.$clicked ? `2px solid ${theme.COLOR.MAIN.GREEN}` : 'none'}; color: ${props => props.$clicked ? `${theme.COLOR.MAIN.GREEN}` : `${theme.COLOR.MAIN.GRAY}`}; font-size: ${FONT_SIZE.SM}; - + font-weight: ${props => (props.$clicked ? 'bold' : 'none')}; border-radius: 40px; cursor: pointer; @@ -58,8 +59,7 @@ const HeaderWrapper = styled.div` flex-direction: row; justify-content: center; align-items: center; - height: 60px; - margin-top: 20px; + height: 200px; gap: 120px; margin-bottom: 20px; @@ -73,7 +73,7 @@ const HeaderWrapper = styled.div` } @media (max-width: 600px) { - gap: 120px; + gap: 80px; h1 { font-size: 50px; } @@ -89,20 +89,16 @@ const FontWrapper = styled.div` -webkit-transform: rotate(90deg); // Chrome Safari Opera color: #1c1c1c; - font-size: 15px; + font-size: 25px; font-weight: bold; `; const CircleWrapper = styled.div` display: flex; - font-family: 'Pretenard-bold'; - h1 { - font-size: 30px; - } `; const Circle = styled.div` - width: 40px; - height: 40px; + width: 120px; + height: 120px; border-radius: 50%; background-color: black; `; @@ -114,7 +110,6 @@ const HomeContentContainer = styled.div` const SchedulesContainer = styled.div` max-height: 400px; - padding: 0 30px; &::-webkit-scrollbar { @@ -131,8 +126,9 @@ const SchedulesContainer = styled.div` const IntroductionContainer = styled.div` display: flex; flex-direction: column; - gap: 10px; - width: 100%; + gap: 20px; + + width: 90%; padding: 20px; background-color: ${theme.COLOR.MAIN.LIGHT_GREEN}; border-radius: 10px; @@ -182,7 +178,6 @@ const Image = styled.img` const CalendarContainer = styled.div` position: relative; - color: black; `; const PrevBtn = styled.button` diff --git a/src/index.css b/src/index.css index e23610e4..a472d510 100644 --- a/src/index.css +++ b/src/index.css @@ -98,23 +98,29 @@ /* REACT_CALENDAR */ .react-calendar { - width: 290px; - + width: 300px; max-width: 100%; border: none; + line-height: 1.125em; @media (min-width: 640px) { - width: 400px; + width: 500px; } } .react-calendar__month-view__weekdays { display: flex; - justify-content: center; + flex-direction: row; + margin-left: 30px; + gap: 5px; align-items: center; + justify-content: center; - margin-left: 5%; - width: 100%; + @media (max-width: 600px) { + width: 100%; + margin-left: 4px; + gap: 0px; + } } .react-calendar__navigation__label > span { @@ -147,9 +153,9 @@ border-radius: 50%; @media (min-width: 640px) { - font-size: 20px; - width: 50px; - height: 50px; + font-size: 22px; + width: 60px; + height: 60px; } } } @@ -158,18 +164,17 @@ position: absolute; bottom: 0px; content: 'TODAY'; + font-family: 900; background-color: gold; border-radius: 10px; padding: 2px 8px; - font-size: 10px; } /* 일자 */ .react-calendar__tile { text-align: center; position: relative; - height: 50px; - color: black; + height: 80px; display: flex; flex-direction: column; justify-content: center; @@ -186,13 +191,13 @@ abbr { text-decoration: none; - width: 40px; - height: 40px; - border-radius: 100%; + width: 60px; + height: 60px; + border-radius: 50%; display: flex; justify-content: center; align-items: center; - border-radius: 100%; + border-radius: 50%; border: 2px solid black !important; @media (max-width: 600px) { diff --git a/src/pages/map/Map.style.js b/src/pages/map/Map.style.js index 827df1d3..8080f73a 100644 --- a/src/pages/map/Map.style.js +++ b/src/pages/map/Map.style.js @@ -24,6 +24,7 @@ const AddButton = styled.button` position: sticky; bottom: 20px; margin-right: -80px; + cursor: pointer; z-index: 1; align-self: flex-end; @@ -31,7 +32,7 @@ const AddButton = styled.button` const ButtonContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - margin-top: 10px; + margin-top: 40px; border: 1px solid ${theme.COLOR.MAIN.GREEN}; border-radius: 40px; `; @@ -39,13 +40,13 @@ const ButtonContainer = styled.div` const Button = styled.button` width: 200px; background-color: #ffffff; - padding: 10px; + padding: 20px; border: ${props => props.$clicked ? `2px solid ${theme.COLOR.MAIN.GREEN}` : 'none'}; color: ${props => props.$clicked ? `${theme.COLOR.MAIN.GREEN}` : `${theme.COLOR.MAIN.GRAY}`}; font-size: ${FONT_SIZE.SM}; - + font-weight: ${props => (props.$clicked ? 'bold' : 'none')}; border-radius: 40px; cursor: pointer; @@ -56,7 +57,7 @@ const Button = styled.button` } @media ${theme.WINDOW_SIZE.MOBILE} { - width: 140px; + width: 150px; } `; @@ -67,10 +68,7 @@ const CalendarContainer = styled.div` const JourneyWrapper = styled.div``; const MapContainer = styled.div` - width: 80%; - display: flex; - flex-direction: Column; - height: 65vh; + width: 90%; margin-top: 40px; `; From 8b1d7e2b03a7c4bf1bcaa9fbc047269205773c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9A=A9=EB=AF=BC?= Date: Sat, 17 Feb 2024 23:31:42 +0900 Subject: [PATCH 16/52] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b2b6e48..cf5e5cfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,10 +24,10 @@ jobs: aws-region: ${{ secrets.AWS_REGION }} - name: Generate build - run: yarn build + run: yarn run build - name: Deploy - run: aws s3 cp --recursive --region ap-northeast-2 dist s3://hereyoubuckey + run: aws s3 cp --recursive --region ap-northeast-2 dist s3://here---you env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From eda2f8dbb43d6be069ec0308edb0337f3202287c Mon Sep 17 00:00:00 2001 From: chaKK Date: Sat, 17 Feb 2024 18:59:04 +0900 Subject: [PATCH 17/52] =?UTF-8?q?Style:=20=ED=95=98=EB=A3=A8=EC=9D=BC?= =?UTF-8?q?=EC=A7=80=20=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=8A=A4=EC=BC=88=EB=A0=88=ED=86=A4=20UI=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dailyRecord/DailyRecordPage.jsx | 75 ++++++++++++----------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/src/pages/dailyRecord/DailyRecordPage.jsx b/src/pages/dailyRecord/DailyRecordPage.jsx index 82ac8bc3..4865e7a4 100644 --- a/src/pages/dailyRecord/DailyRecordPage.jsx +++ b/src/pages/dailyRecord/DailyRecordPage.jsx @@ -3,6 +3,7 @@ import { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import * as S from './DailyRecordPage.style'; +import DailyRecordEditSkeleton from './edit/skeleton/DailyRecordEditSkeleton'; import PenGreen from '/icons/PenGreen.svg'; import { MOOD_ICON_LIST, WEATHER_ICON_LIST } from '@/constants/dailyRecord'; import { useGetDiary } from '@/hooks/home/useGetDiary'; @@ -18,49 +19,51 @@ const DailyRecordPage = () => { return { date }; }, [diaryData]); - if (loading) { - return
로딩 중입니다..
; - } - if (error) { return ; } return ( - - - {Date.date && Date?.date[0]} - - {Date.date && Date?.date[1]}, {Date.date && Date?.date[2]} - - - - - - - {diaryData?.place} - {diaryData?.title} + <> + {loading ? ( + + ) : ( + + + {Date.date && Date?.date[0]} + + {Date.date && Date?.date[1]}, {Date.date && Date?.date[2]} + + + + + + + {diaryData?.place} + {diaryData?.title} - - {WEATHER_ICON_LIST.map(item => { - if (item.iconName === diaryData?.weather) { - return ; - } - })} - {MOOD_ICON_LIST.map(item => { - if (item.iconName === diaryData?.mood) { - return ; - } - })} - - {diaryData?.content} - + + {WEATHER_ICON_LIST.map(item => { + if (item.iconName === diaryData?.weather) { + return ; + } + })} + {MOOD_ICON_LIST.map(item => { + if (item.iconName === diaryData?.mood) { + return ; + } + })} + + {diaryData?.content} + - - - - + + + + + )} + ); }; From a967c62c99ac93a7f8086eb09397f168e85e5ac8 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sat, 17 Feb 2024 19:05:47 +0900 Subject: [PATCH 18/52] =?UTF-8?q?Feat:=20=ED=95=98=EB=A3=A8=EC=9D=BC?= =?UTF-8?q?=EC=A7=80=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dailyRecord/List/DailyRecordListPage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/dailyRecord/List/DailyRecordListPage.jsx b/src/pages/dailyRecord/List/DailyRecordListPage.jsx index 3c3da30c..6713f2f1 100644 --- a/src/pages/dailyRecord/List/DailyRecordListPage.jsx +++ b/src/pages/dailyRecord/List/DailyRecordListPage.jsx @@ -66,7 +66,7 @@ const DailyRecordListPage = () => { return ( <> - {!loading ? ( + {loading ? ( ) : ( From 04a7b0c76cff68a3950aa534de9291c131662648 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sat, 17 Feb 2024 19:06:51 +0900 Subject: [PATCH 19/52] =?UTF-8?q?Feat:=20=ED=95=98=EB=A3=A8=EC=9D=BC?= =?UTF-8?q?=EC=A7=80=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=A1=9C=EB=94=A9=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/dailyRecord/List/DailyRecordListPage.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/dailyRecord/List/DailyRecordListPage.jsx b/src/pages/dailyRecord/List/DailyRecordListPage.jsx index 6713f2f1..4bec75ff 100644 --- a/src/pages/dailyRecord/List/DailyRecordListPage.jsx +++ b/src/pages/dailyRecord/List/DailyRecordListPage.jsx @@ -60,13 +60,9 @@ const DailyRecordListPage = () => { } }; - if (!validDiaryData) { - return
로딩 중입니다..
; - } - return ( <> - {loading ? ( + {loading || !validDiaryData ? ( ) : ( From 7906ce3f80fee6e8e04b1f91dd9a3f6bacafe303 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 00:37:23 +0900 Subject: [PATCH 20/52] =?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/apis/request/home.js | 2 -- src/apis/request/mate.js | 2 +- src/apis/request/profile.js | 2 +- src/apis/request/signature.js | 2 +- .../signature/SignatureCommentList.jsx | 1 - src/components/login/GoogleLoginButton.jsx | 1 - src/components/mate/FollowButton.jsx | 4 +-- src/components/mate/FollowButton2.jsx | 4 +-- .../inviteMatesModal/InviteMatesModal.jsx | 2 -- .../modal/journeyEdit/JourneyEditModal.jsx | 2 +- .../journeyWriteModal/JourneyWriteModal.jsx | 2 +- .../modal/mypage/PublicScopeModal.jsx | 1 - src/components/profile/ProfileBox.jsx | 1 - .../protectedRoute/ProtectedRoute.jsx | 2 +- src/components/schedules/Schedules.jsx | 1 - src/components/signup/SignUpMyInfo.jsx | 1 - src/hooks/home/useLoadMonthlyJourney.js | 29 ++++++++++++++++++ src/hooks/mate/useExploreMate.js | 28 +++++++++++++++++ src/hooks/mate/useGetLocationMate.js | 2 -- src/hooks/mate/useParticipateTeamMate.js | 28 +++++++++++++++++ src/hooks/mate/useSearchInviteMate.js | 1 - src/hooks/mate/useSearchMate.js | 28 +++++++++++++++++ src/hooks/mate/useTeamMateRulePost.js | 2 -- src/hooks/signature/useDeleteMySignature.js | 29 ++++++++++++++++++ src/hooks/signature/useLikeSignature.js | 29 ++++++++++++++++++ src/hooks/signature/useUpdateMySignature.js | 30 +++++++++++++++++++ .../dailyRecord/List/DailyRecordListPage.jsx | 1 - .../dailyRecord/edit/DailyRecordEditPage.jsx | 2 -- .../dailyRecord/write/DailyRecordWrite.jsx | 2 -- src/pages/mate/Mate.jsx | 1 - src/pages/mate/ruleEdit/RuleEdit.jsx | 1 - src/pages/signature/edit/Editor.jsx | 1 - src/pages/signature/post/SignaturePost.jsx | 2 -- src/pages/signature/write/Editor.jsx | 4 --- 34 files changed, 211 insertions(+), 39 deletions(-) create mode 100644 src/hooks/home/useLoadMonthlyJourney.js create mode 100644 src/hooks/mate/useExploreMate.js create mode 100644 src/hooks/mate/useParticipateTeamMate.js create mode 100644 src/hooks/mate/useSearchMate.js create mode 100644 src/hooks/signature/useDeleteMySignature.js create mode 100644 src/hooks/signature/useLikeSignature.js create mode 100644 src/hooks/signature/useUpdateMySignature.js diff --git a/src/apis/request/home.js b/src/apis/request/home.js index 63a67c3f..f7f0e6e4 100644 --- a/src/apis/request/home.js +++ b/src/apis/request/home.js @@ -39,7 +39,6 @@ const deleteJourney = journeyId => { // 일정 작성하기 const createSchedule = (scheduleId, title, location, latitude, longitude) => { - console.log(latitude, longitude); const url = `/api/${VERSION}/${API_BASE.SCHEDULE}/update/${scheduleId}`; const res = axiosWithToken.put(url, { title: title, @@ -59,7 +58,6 @@ const deleteSchedule = scheduleId => { // 세부 일정 추가하기 const addDetailSchedule = (scheduleId, content) => { - console.log(content); const url = `/api/${VERSION}/${API_BASE.DETAIL_SCHEDULE}/create/${scheduleId}`; const res = axiosWithToken.post(url, { content: content, diff --git a/src/apis/request/mate.js b/src/apis/request/mate.js index 0ed8bb69..af762682 100644 --- a/src/apis/request/mate.js +++ b/src/apis/request/mate.js @@ -13,7 +13,7 @@ const postFollowMate = followId => { // FOLLOW_MATE: `/api/${VERSION}/${API_BASE.MATE}/follow/:followId`, // 백엔드 API : api/v1/mate/follow/:followId const url = `${API_URL.FOLLOW_MATE}/${followId}`; - console.log(url); + return axiosWithToken.patch(url); }; diff --git a/src/apis/request/profile.js b/src/apis/request/profile.js index 043886ae..8effc623 100644 --- a/src/apis/request/profile.js +++ b/src/apis/request/profile.js @@ -68,7 +68,7 @@ const getMyDiary = ({ pageParam }) => { } else { url = `${API_URL.GET_ALL_DIARY}?cursor=${pageParam}`; } - console.log(url); + return axiosWithToken.get(url); }; diff --git a/src/apis/request/signature.js b/src/apis/request/signature.js index a4c0ee8b..44b4a596 100644 --- a/src/apis/request/signature.js +++ b/src/apis/request/signature.js @@ -84,7 +84,7 @@ const postSignatureReComment = ({ signatureId, parentId, content }) => { // 시그니처 댓글/답글 수정하기 const updateSignatureReComment = ({ signatureId, commentId, content }) => { const url = `/api/v1/signature/${signatureId}/comment/${commentId}`; - console.log(url); + return axiosWithToken.patch(url, { content: content, }); diff --git a/src/components/comment/signature/SignatureCommentList.jsx b/src/components/comment/signature/SignatureCommentList.jsx index b047fe1f..23d4ca16 100644 --- a/src/components/comment/signature/SignatureCommentList.jsx +++ b/src/components/comment/signature/SignatureCommentList.jsx @@ -22,7 +22,6 @@ const SignatureCommentList = () => { useEffect(() => { if (inView) { - console.log('fire'); !isFetching && hasNextPage && fetchNextPage(); } }, [inView, isFetching, hasNextPage, fetchNextPage]); diff --git a/src/components/login/GoogleLoginButton.jsx b/src/components/login/GoogleLoginButton.jsx index e35649b0..2e1052df 100644 --- a/src/components/login/GoogleLoginButton.jsx +++ b/src/components/login/GoogleLoginButton.jsx @@ -13,7 +13,6 @@ const GoogleLoginButton = () => { const login = useGoogleLogin({ onSuccess: async tokenResponse => { - console.log(tokenResponse); const response = await postSnsLogin('GOOGLE', tokenResponse.access_token); const token = response.data.token; googleLogin(token); diff --git a/src/components/mate/FollowButton.jsx b/src/components/mate/FollowButton.jsx index c716c865..eee9a0c3 100644 --- a/src/components/mate/FollowButton.jsx +++ b/src/components/mate/FollowButton.jsx @@ -12,12 +12,12 @@ const FollowButton = ({ initialFollowState, id }) => { try { if (follow === true) { const res = await postFollowMate(id); - console.log(res); + toast.success('팔로우가 취소되었습니다.'); setFollow(false); } else { const res = await postFollowMate(id); - console.log(res); + toast.success('팔로잉되었습니다.'); setFollow(true); } diff --git a/src/components/mate/FollowButton2.jsx b/src/components/mate/FollowButton2.jsx index 3de7fdbe..00f8101d 100644 --- a/src/components/mate/FollowButton2.jsx +++ b/src/components/mate/FollowButton2.jsx @@ -14,12 +14,12 @@ const FollowButton2 = ({ initialFollowState, id }) => { try { if (follow === true) { const res = await postFollowMate(id); - console.log(res); + toast.success('팔로우가 취소되었습니다.'); setFollow(false); } else { const res = await postFollowMate(id); - console.log(res); + toast.success('팔로잉되었습니다.'); setFollow(true); } diff --git a/src/components/modal/inviteMatesModal/InviteMatesModal.jsx b/src/components/modal/inviteMatesModal/InviteMatesModal.jsx index 0fefbc44..f49e896d 100644 --- a/src/components/modal/inviteMatesModal/InviteMatesModal.jsx +++ b/src/components/modal/inviteMatesModal/InviteMatesModal.jsx @@ -30,8 +30,6 @@ const InviteMatesModal = () => { const searchMates = search?.pages; - console.log(searchMates); - const handleInviteClick = () => { InviteMatesModal.onClose(); }; diff --git a/src/components/modal/journeyEdit/JourneyEditModal.jsx b/src/components/modal/journeyEdit/JourneyEditModal.jsx index 736d418c..aee4bd1a 100644 --- a/src/components/modal/journeyEdit/JourneyEditModal.jsx +++ b/src/components/modal/journeyEdit/JourneyEditModal.jsx @@ -67,7 +67,7 @@ const JourneyEditModal = ({ journeyId, journeyTitle, startDate, endDate }) => { const res = await updateJourney({ ...data, journeyId: journeyId }); if (res) { toast.success('여정이 수정되었습니다.'); - console.log('제출된 데이터: ', data); + window.location.reload(); } } catch (error) { diff --git a/src/components/modal/journeyWriteModal/JourneyWriteModal.jsx b/src/components/modal/journeyWriteModal/JourneyWriteModal.jsx index 3163715d..2fcfbee1 100644 --- a/src/components/modal/journeyWriteModal/JourneyWriteModal.jsx +++ b/src/components/modal/journeyWriteModal/JourneyWriteModal.jsx @@ -66,7 +66,7 @@ const JourneyWriteModal = ({ startDate, endDate }) => { const res = await saveJourney(data); if (res) { toast.success('여정이 저장되었습니다.'); - console.log('제출된 데이터: ', data); + window.location.reload(); } } catch (error) { diff --git a/src/components/modal/mypage/PublicScopeModal.jsx b/src/components/modal/mypage/PublicScopeModal.jsx index 4c0a85e2..c7d406e9 100644 --- a/src/components/modal/mypage/PublicScopeModal.jsx +++ b/src/components/modal/mypage/PublicScopeModal.jsx @@ -73,7 +73,6 @@ const PublicScopeModal = ({ myVisibility }) => { const res = await putPublicScope(visibility); if (res) { toast.success('공개범위가 설정되었습니다.'); - console.log('제출된 데이터: ', data); } } catch (error) { console.log(error); diff --git a/src/components/profile/ProfileBox.jsx b/src/components/profile/ProfileBox.jsx index ec8ab8f8..9d9c78fa 100644 --- a/src/components/profile/ProfileBox.jsx +++ b/src/components/profile/ProfileBox.jsx @@ -17,7 +17,6 @@ const ProfileBox = ({ profile }) => { toast.error('팔로우 요청을 실패했습니다. 나중에 다시 시도해주세요.'); }, onSettled: isSuccess => { - console.log(isSuccess); if (isSuccess.data.success === true) { toast.success(isSuccess.data.message); } else { diff --git a/src/components/protectedRoute/ProtectedRoute.jsx b/src/components/protectedRoute/ProtectedRoute.jsx index 5abae3fb..51cf95a0 100644 --- a/src/components/protectedRoute/ProtectedRoute.jsx +++ b/src/components/protectedRoute/ProtectedRoute.jsx @@ -9,7 +9,7 @@ import useAuth from '@/store/useAuth'; const ProtectedRouter = ({ children }) => { const navigate = useNavigate(); const { isLogin } = useAuth(); - console.log(isLogin); + return isLogin === true ? children : ; }; diff --git a/src/components/schedules/Schedules.jsx b/src/components/schedules/Schedules.jsx index 2c77c4e2..881b1894 100644 --- a/src/components/schedules/Schedules.jsx +++ b/src/components/schedules/Schedules.jsx @@ -97,7 +97,6 @@ const Schedules = ({ data, endDate, refetch }) => { ); if (res) { - console.log('제출된 데이터: ', data); refetch({ refetchPage: (page, index) => index === 0 }); toast.success('일정이 저장되었습니다.'); } diff --git a/src/components/signup/SignUpMyInfo.jsx b/src/components/signup/SignUpMyInfo.jsx index 08d801d7..8ff36023 100644 --- a/src/components/signup/SignUpMyInfo.jsx +++ b/src/components/signup/SignUpMyInfo.jsx @@ -34,7 +34,6 @@ const SignUpMyInfo = () => { const res = postAddInformation(data.nickname, data.introduction); if (res) { toast.success('정보가 입력되었습니다.'); - console.log('제출된 데이터: ', data); setTimeout(() => { navigate('/'); }, 500); diff --git a/src/hooks/home/useLoadMonthlyJourney.js b/src/hooks/home/useLoadMonthlyJourney.js new file mode 100644 index 00000000..323f6ae3 --- /dev/null +++ b/src/hooks/home/useLoadMonthlyJourney.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { loadMonthlySchedule } from '@/apis/request/home'; + +export const useLoadMonthlyJourney = (year, month) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await loadMonthlySchedule(year, month); + const data = res.data.data; + setData(data); + } catch (e) { + console.log(e); + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useExploreMate.js b/src/hooks/mate/useExploreMate.js new file mode 100644 index 00000000..8e2d2a3e --- /dev/null +++ b/src/hooks/mate/useExploreMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getExploreMate } from '@/apis/request/mate'; + +export const useExploreMate = userId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getExploreMate(userId); + const data = res.data.data.recommend_mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [userId]); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useGetLocationMate.js b/src/hooks/mate/useGetLocationMate.js index 316caa3b..763fe012 100644 --- a/src/hooks/mate/useGetLocationMate.js +++ b/src/hooks/mate/useGetLocationMate.js @@ -12,9 +12,7 @@ export const useGetLocationMate = () => { try { setLoading(true); const res = await getLocationMate(); - console.log(res); const data = res.data.data; - console.log(data); setData(data); } catch (e) { setError(e.message || '에러가 발생했습니다.'); diff --git a/src/hooks/mate/useParticipateTeamMate.js b/src/hooks/mate/useParticipateTeamMate.js new file mode 100644 index 00000000..661c28b2 --- /dev/null +++ b/src/hooks/mate/useParticipateTeamMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getParticipateTeamMate } from '@/apis/request/mate'; + +export const useParticipateTeamMate = ruleId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getParticipateTeamMate(ruleId); + const data = res.data.data.mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [ruleId]); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useSearchInviteMate.js b/src/hooks/mate/useSearchInviteMate.js index fc833604..5765a4d5 100644 --- a/src/hooks/mate/useSearchInviteMate.js +++ b/src/hooks/mate/useSearchInviteMate.js @@ -13,7 +13,6 @@ export const useSearchInviteMate = searchTerm => { setLoading(true); const res = await getSearchInviteMate(searchTerm); const data = res.data.data.mates; - console.log(data); setData(data); } catch (e) { setError(e.message || '에러가 발생했습니다.'); diff --git a/src/hooks/mate/useSearchMate.js b/src/hooks/mate/useSearchMate.js new file mode 100644 index 00000000..3b77dcec --- /dev/null +++ b/src/hooks/mate/useSearchMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getSearchMate } from '@/apis/request/mate'; + +export const useSearchMate = (searchTerm, cursor, take) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getSearchMate(searchTerm, cursor, take); + const data = res.data.data.mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [searchTerm, cursor, take]); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useTeamMateRulePost.js b/src/hooks/mate/useTeamMateRulePost.js index 3297d558..399da5bf 100644 --- a/src/hooks/mate/useTeamMateRulePost.js +++ b/src/hooks/mate/useTeamMateRulePost.js @@ -12,9 +12,7 @@ export const useTeamMateRulePost = ruleId => { try { setLoading(true); const res = await getTeamMateRulePost(ruleId); - console.log(res); const data = res.data.data; - setData(data); } catch (e) { setError(e.message || '에러가 발생했습니다.'); diff --git a/src/hooks/signature/useDeleteMySignature.js b/src/hooks/signature/useDeleteMySignature.js new file mode 100644 index 00000000..8c616152 --- /dev/null +++ b/src/hooks/signature/useDeleteMySignature.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { deleteMySignature } from '@/apis/request/signature'; + +// 시그니처 삭제하기 +export const useDeleteMySignature = signatureId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await deleteMySignature(signatureId); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/signature/useLikeSignature.js b/src/hooks/signature/useLikeSignature.js new file mode 100644 index 00000000..61d24313 --- /dev/null +++ b/src/hooks/signature/useLikeSignature.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { likeSignature } from '@/apis/request/signature'; + +// 시그니처 좋아요 +export const useLikeSignature = signatureId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await likeSignature(signatureId); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/signature/useUpdateMySignature.js b/src/hooks/signature/useUpdateMySignature.js new file mode 100644 index 00000000..fdb718d8 --- /dev/null +++ b/src/hooks/signature/useUpdateMySignature.js @@ -0,0 +1,30 @@ +import { useEffect, useState } from 'react'; + +import { updateMySignature } from '@/apis/request/signature'; + +//시그니처 수정하기 +export const useUpdateMySignature = (signatureId, { patchData }) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await updateMySignature(signatureId, { patchData }); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; +s; diff --git a/src/pages/dailyRecord/List/DailyRecordListPage.jsx b/src/pages/dailyRecord/List/DailyRecordListPage.jsx index 4bec75ff..b23c4f76 100644 --- a/src/pages/dailyRecord/List/DailyRecordListPage.jsx +++ b/src/pages/dailyRecord/List/DailyRecordListPage.jsx @@ -30,7 +30,6 @@ const DailyRecordListPage = () => { useEffect(() => { const validData = diaryData?.diaryList?.filter(s => s !== null); - // console.log('실제로 존재하는 일지: ', validData); setValidDiaryData(validData); }, [diaryData]); diff --git a/src/pages/dailyRecord/edit/DailyRecordEditPage.jsx b/src/pages/dailyRecord/edit/DailyRecordEditPage.jsx index 9a6a62d1..c40d4c17 100644 --- a/src/pages/dailyRecord/edit/DailyRecordEditPage.jsx +++ b/src/pages/dailyRecord/edit/DailyRecordEditPage.jsx @@ -99,13 +99,11 @@ const DailyRecordEditPage = () => { setLoading(true); const res = await updateDiary(diaryId, data); if (res) { - console.log('제출된 데이터: ', data); toast.success('수정되었습니다'); navigate(`/dailyrecord?scheduleId=${scheduleId}`); } } catch (e) { setError(e); - console.log(e); toast.error('일지 수정 중에 에러가 발생했습니다. 다시 시도해주세요'); } finally { setLoading(false); diff --git a/src/pages/dailyRecord/write/DailyRecordWrite.jsx b/src/pages/dailyRecord/write/DailyRecordWrite.jsx index 15b2c589..21162c2a 100644 --- a/src/pages/dailyRecord/write/DailyRecordWrite.jsx +++ b/src/pages/dailyRecord/write/DailyRecordWrite.jsx @@ -92,13 +92,11 @@ const DailyRecordWritePage = () => { setIsLoading(true); const res = await postDiary({ scheduleId: scheduleId, postData: data }); if (res) { - console.log('제출된 데이터: ', data); toast.success('하루 일지가 작성되었습니다.'); navigate(`/dailyrecord?scheduleId=${scheduleId}`); } } catch (e) { setIsError(true); - console.log(e); toast.error('작성 중 에러가 발생했습니다. 나중에 다시 시도해주세요'); } finally { setIsLoading(false); diff --git a/src/pages/mate/Mate.jsx b/src/pages/mate/Mate.jsx index 4229eacc..b9211a65 100644 --- a/src/pages/mate/Mate.jsx +++ b/src/pages/mate/Mate.jsx @@ -43,7 +43,6 @@ const MatePage = () => { toast.error('팔로우 요청을 실패했습니다. 나중에 다시 시도해주세요.'); }, onSettled: isSuccess => { - console.log(isSuccess); if (isSuccess.data.success === true) { toast.success(isSuccess.data.message); } else { diff --git a/src/pages/mate/ruleEdit/RuleEdit.jsx b/src/pages/mate/ruleEdit/RuleEdit.jsx index d916195d..fbd46fa6 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(() => { diff --git a/src/pages/signature/edit/Editor.jsx b/src/pages/signature/edit/Editor.jsx index 3928d8cb..d196200f 100644 --- a/src/pages/signature/edit/Editor.jsx +++ b/src/pages/signature/edit/Editor.jsx @@ -54,7 +54,6 @@ const Editor = ({ signatureId }) => { toast.success('시그니처가 수정되었습니다.'); navigate(`/signature/post/${signatureId}`); } - console.log(res); } catch (e) { setError(e); toast.error('에러가 발생했습니다.'); diff --git a/src/pages/signature/post/SignaturePost.jsx b/src/pages/signature/post/SignaturePost.jsx index d0c7d913..3c7502e4 100644 --- a/src/pages/signature/post/SignaturePost.jsx +++ b/src/pages/signature/post/SignaturePost.jsx @@ -43,7 +43,6 @@ const SignaturePostPage = () => { toast.error('좋아요를 실패했습니다. 나중에 다시 시도해주세요.'); }, onSettled: isSuccess => { - console.log(isSuccess); if (isSuccess.data.success === true) { toast.success(isSuccess.data.message); } else { @@ -67,7 +66,6 @@ const SignaturePostPage = () => { }; const handlePrevPage = () => { - console.log('첫 번째 페이지입니다.'); if (step > 1) { setStep(prevStep => prevStep - 1); } diff --git a/src/pages/signature/write/Editor.jsx b/src/pages/signature/write/Editor.jsx index c255203b..d2582ba1 100644 --- a/src/pages/signature/write/Editor.jsx +++ b/src/pages/signature/write/Editor.jsx @@ -65,18 +65,14 @@ export default function Editor({ setSelectedHeader }) { try { setLoading(true); - console.log('title: ', title, 'pages: ', pages.slice(0, pages.length)); - console.log(allPagesFilled); const res = await postNewSignature(title, pages.slice(0, pages.length)); if (res) { toast.success('시그니처가 저장되었습니다.'); - console.log(res); updateTitle(''); } setSelectedHeader('내 시그니처'); } catch (e) { setError(e); - console.log(e); toast.error('에러가 발생했습니다.'); } finally { setLoading(false); From e67346a322f2bf06f67cec1ccb443aab1d7f7c41 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 00:43:16 +0900 Subject: [PATCH 21/52] =?UTF-8?q?HOTFIX:=20=EA=B5=AC=EA=B8=80=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=97=90=EB=9F=AC=20=EC=A2=85=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/LoginButton.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/login/LoginButton.jsx b/src/components/login/LoginButton.jsx index 12efe675..7b870496 100644 --- a/src/components/login/LoginButton.jsx +++ b/src/components/login/LoginButton.jsx @@ -9,9 +9,9 @@ const LoginButton = () => { return ( <> - + {/* - + */} ); }; From f5c1cb82ec017a735a4a41bb92fb0ecb94d8373e 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 00:48:53 +0900 Subject: [PATCH 22/52] =?UTF-8?q?feat:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/KakaoLoginButton.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/login/KakaoLoginButton.jsx b/src/components/login/KakaoLoginButton.jsx index 2280aff2..0fae093e 100644 --- a/src/components/login/KakaoLoginButton.jsx +++ b/src/components/login/KakaoLoginButton.jsx @@ -4,7 +4,7 @@ import KakaoIcon from '/images/Kakao.svg'; const KakaoLoginButton = () => { const Rest_api_key = import.meta.env.VITE_KAKAO_REST_API_KEAY; const redirect_uri = import.meta.env.VITE_REDIRECT_URI; - + console.log(Rest_api_key); const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${Rest_api_key}&redirect_uri=${redirect_uri}&response_type=code`; const handleLogin = () => { window.location.href = kakaoURL; From e924dc3781ef73983a0bcf5a45e43057ca9bf5da 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 00:53:18 +0900 Subject: [PATCH 23/52] =?UTF-8?q?fix:=20=EA=B5=AC=EA=B8=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/login/KakaoLoginButton.jsx | 1 - src/components/login/LoginButton.jsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/login/KakaoLoginButton.jsx b/src/components/login/KakaoLoginButton.jsx index 0fae093e..628093f6 100644 --- a/src/components/login/KakaoLoginButton.jsx +++ b/src/components/login/KakaoLoginButton.jsx @@ -4,7 +4,6 @@ import KakaoIcon from '/images/Kakao.svg'; const KakaoLoginButton = () => { const Rest_api_key = import.meta.env.VITE_KAKAO_REST_API_KEAY; const redirect_uri = import.meta.env.VITE_REDIRECT_URI; - console.log(Rest_api_key); const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${Rest_api_key}&redirect_uri=${redirect_uri}&response_type=code`; const handleLogin = () => { window.location.href = kakaoURL; diff --git a/src/components/login/LoginButton.jsx b/src/components/login/LoginButton.jsx index 7b870496..12efe675 100644 --- a/src/components/login/LoginButton.jsx +++ b/src/components/login/LoginButton.jsx @@ -9,9 +9,9 @@ const LoginButton = () => { return ( <> - {/* + - */} + ); }; From 937087e5595e6348447a7b9b4b5ab4de9a710ad7 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 01:02:43 +0900 Subject: [PATCH 24/52] =?UTF-8?q?feat:=20=EA=B3=B5=EA=B0=9C=EB=B2=94?= =?UTF-8?q?=EC=9C=84=20=EC=84=A4=EC=A0=95=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mypage/SubCateGoryPage.jsx | 17 +---------------- src/constants/subcategory.js | 14 +++++++------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/components/mypage/SubCateGoryPage.jsx b/src/components/mypage/SubCateGoryPage.jsx index 2d1868a0..9375bf3d 100644 --- a/src/components/mypage/SubCateGoryPage.jsx +++ b/src/components/mypage/SubCateGoryPage.jsx @@ -1,32 +1,17 @@ -import LogoutModal from '../modal/mypage/LogoutModal'; -import PublicScopeModal from '../modal/mypage/PublicScopeModal'; import * as S from './SubCateGoryPage.style'; -import useLogoutModal from '@/hooks/modal/useLogoutModal'; -import usePublicScopeModal from '@/hooks/modal/usePublicScopeModal'; -import useAuth from '@/store/useAuth'; const SubCateGoryPage = ({ header, listName }) => { - const publicScopeModal = usePublicScopeModal(); - return (

{header}

{listName?.map(list => ( - { - if (list.modal === true && list.id === 3) { - return publicScopeModal.onOpen(); - } - }}> +

{list.title}

))} - -
); }; diff --git a/src/constants/subcategory.js b/src/constants/subcategory.js index 7940c993..84f9e5ee 100644 --- a/src/constants/subcategory.js +++ b/src/constants/subcategory.js @@ -22,13 +22,13 @@ const USER_SETTING = [ link: '/signature', modal: false, }, - { - id: 3, - img: myPageImg.Lock, - title: '공개범위 설정', - link: null, - modal: true, - }, + // { + // id: 3, + // img: myPageImg.Lock, + // title: '공개범위 설정', + // link: null, + // modal: true, + // }, ]; const SUPPORT = [ From d3af4e4ae911d8226d60c48696ec29ed7d441186 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 01:15:58 +0900 Subject: [PATCH 25/52] =?UTF-8?q?feat:=20RuleEdit=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mate/ruleEdit/RuleEdit.jsx | 3 ++- src/pages/mate/ruleEdit/RuleEdit.style.js | 11 +++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/pages/mate/ruleEdit/RuleEdit.jsx b/src/pages/mate/ruleEdit/RuleEdit.jsx index fbd46fa6..960d871b 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.jsx +++ b/src/pages/mate/ruleEdit/RuleEdit.jsx @@ -84,6 +84,7 @@ const RuleEditPage = () => { rulePairs: sortedRulePairs, membersId: extractMembersId, }; + console.log(postDataWithId); updateTeamMateRule(ruleId, { postDataWithId }) .then(() => { @@ -155,7 +156,7 @@ const RuleEditPage = () => { )} - 저장하기 + 수정하기
); }; diff --git a/src/pages/mate/ruleEdit/RuleEdit.style.js b/src/pages/mate/ruleEdit/RuleEdit.style.js index 81074446..f40e2310 100644 --- a/src/pages/mate/ruleEdit/RuleEdit.style.js +++ b/src/pages/mate/ruleEdit/RuleEdit.style.js @@ -5,13 +5,11 @@ import theme from '@/theme'; const Container = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - width: 100%; - height: 100%; `; const Wrapper = styled.div` width: 80%; - height: 80%; + height: 900px; overflow-y: scroll; border: 2px solid ${theme.COLOR.MAIN.HEAVY_GREEN}; @@ -29,7 +27,7 @@ const Wrapper = styled.div` const Header = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - gap: 3px; + gap: 20px; h1 { ${theme.ALIGN.ROW_CENTER}; @@ -56,11 +54,8 @@ const PlusSvg = styled.img` `; const MatesContainer = styled.div` - display: flex; + ${theme.ALIGN.ROW_CENTER}; gap: 2px; - width: 90%; - overflow: scroll; - flex: flex-end; `; const MatesImages = styled.img` From fd58dbe935a990a4065a5085f215ff146bb8d70c 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 01:23:36 +0900 Subject: [PATCH 26/52] =?UTF-8?q?feat:=20MateRuleWrite=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mate/ruleWrite/MateRuleWrite.jsx | 8 ++++---- src/pages/mate/ruleWrite/MateRuleWrite.style.js | 13 ++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/pages/mate/ruleWrite/MateRuleWrite.jsx b/src/pages/mate/ruleWrite/MateRuleWrite.jsx index 312cdd81..ed60bc57 100644 --- a/src/pages/mate/ruleWrite/MateRuleWrite.jsx +++ b/src/pages/mate/ruleWrite/MateRuleWrite.jsx @@ -82,17 +82,17 @@ const MateRuleWritePage = () => { { const newRules = [...rules]; newRules[index].ruleTitle = e.target.value; setRules(newRules); }} - maxlength="20" + maxLength="250" /> { const newRules = [...rules]; @@ -101,7 +101,7 @@ const MateRuleWritePage = () => { }} rows="5" columns="2" - maxlength="1500" + maxLength="1500" /> handleRemoveRule(index)}> X diff --git a/src/pages/mate/ruleWrite/MateRuleWrite.style.js b/src/pages/mate/ruleWrite/MateRuleWrite.style.js index 4829184f..4ed76f41 100644 --- a/src/pages/mate/ruleWrite/MateRuleWrite.style.js +++ b/src/pages/mate/ruleWrite/MateRuleWrite.style.js @@ -5,13 +5,11 @@ import theme from '@/theme'; const Container = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - width: 100%; - height: 100%; `; const Wrapper = styled.div` width: 80%; - height: 85%; + height: 900px; overflow-y: scroll; border: 2px solid ${theme.COLOR.MAIN.HEAVY_GREEN}; @@ -36,7 +34,7 @@ const TitleInput = styled.input` font-size: ${FONT_SIZE.TWO_XL}; @media ${theme.WINDOW_SIZE.MOBILE} { - font-size: ${FONT_SIZE.LG}; + font-size: ${FONT_SIZE.SM}; padding: 10px; } `; @@ -55,9 +53,6 @@ const PlusSvg = styled.img` const MatesContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; gap: 2px; - width: 90%; - margin: 0 auto; - overflow: scroll; `; const MatesImages = styled.img` @@ -104,7 +99,7 @@ const ContentTitleInput = styled.input` font-size: ${FONT_SIZE.BASE}; @media ${theme.WINDOW_SIZE.MOBILE} { - font-size: ${FONT_SIZE.S}; + font-size: ${FONT_SIZE.XS}; } `; @@ -141,7 +136,7 @@ const AddQuestionButton = styled.button` const SubmitBtn = styled.button` border: none; width: 200px; - height: 43px; + height: 50px; margin-top: 20px; background-color: ${theme.COLOR.MAIN.HEAVY_GREEN}; color: white; From a0a206201f4006696b35db13dc23cbe4c9a638b8 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 01:28:27 +0900 Subject: [PATCH 27/52] =?UTF-8?q?feat:=20MateRuleCheck=20style=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mate/ruleCheck/MateRuleCheck.style.js | 2 +- .../mate/ruleCheck/MateRuleDetailCheck.style.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/mate/ruleCheck/MateRuleCheck.style.js b/src/pages/mate/ruleCheck/MateRuleCheck.style.js index fcfc5a01..7745015d 100644 --- a/src/pages/mate/ruleCheck/MateRuleCheck.style.js +++ b/src/pages/mate/ruleCheck/MateRuleCheck.style.js @@ -23,7 +23,7 @@ const StyledTitle = styled.span` margin-bottom: 35px; @media ${theme.WINDOW_SIZE.MOBILE} { - font-size: 18px; + font-size: 12px; } `; diff --git a/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js b/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js index 1640bcc8..7411910c 100644 --- a/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js +++ b/src/pages/mate/ruleCheck/MateRuleDetailCheck.style.js @@ -9,9 +9,9 @@ const Container = styled.div` const Wrapper = styled.div` width: 80%; - height: 60vh; + height: 900px; overflow-y: scroll; - margin-top: 40px; + border: 2px solid ${theme.COLOR.MAIN.HEAVY_GREEN}; border-radius: 20px; padding: 20px; @@ -49,12 +49,12 @@ const Title = styled.h1` const ProfileContainer = styled.div` ${theme.ALIGN.ROW_CENTER}; - width: 100%; `; const ProfileBox = styled.div` ${theme.ALIGN.COLUMN_CENTER}; - margin: 0px 4px; + margin-right: 10px; + h3 { font-size: ${FONT_SIZE.XS}; white-space: nowrap; @@ -63,8 +63,8 @@ const ProfileBox = styled.div` const ProfileImages = styled.img` border-radius: 50%; - width: 30px; - height: 30px; + width: 40px; + height: 40px; margin-bottom: 10px; object-fit: cover; `; From e8c9fd105be2e3fafb87bbcfa870cd712223d363 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:02:20 +0900 Subject: [PATCH 28/52] =?UTF-8?q?feat:=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e2747cc..9b2c5c00 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --host", - "build": "vite build", + "build": "vite build --mode production", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "start": "vite start -p 80", From 05fea4fb0ce30955c32761226dd53adac7c83b17 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:04:21 +0900 Subject: [PATCH 29/52] =?UTF-8?q?feat:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mate/RuleComments.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mate/RuleComments.jsx b/src/components/mate/RuleComments.jsx index e09dc057..0d5c0939 100644 --- a/src/components/mate/RuleComments.jsx +++ b/src/components/mate/RuleComments.jsx @@ -23,7 +23,7 @@ const RuleComments = (userImage, commentsData) => { {userImage && } - + From a2cc23d4fcded1f80d3bbf03f64b6d89cfd9592d 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:18:53 +0900 Subject: [PATCH 30/52] =?UTF-8?q?feat:=20main.yml=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf5e5cfb..26f57183 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,15 @@ jobs: - name: Check Node v run: node -v + - name: .env setting + run: | + 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 + - name: Install dependencies run: yarn From 2a271252543b58e20c9bd349381ea0443922fec9 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:25:13 +0900 Subject: [PATCH 31/52] =?UTF-8?q?feat:=20main.yml=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26f57183..16bf7563 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,15 +13,6 @@ jobs: - name: Check Node v run: node -v - - name: .env setting - run: | - 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 - - name: Install dependencies run: yarn @@ -36,7 +27,7 @@ jobs: run: yarn run build - name: Deploy - run: aws s3 cp --recursive --region ap-northeast-2 dist s3://here---you + run: aws s3 cp --recursive --region ap-northeast-2 ./dist s3://here---you env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 9cea90a82d40066362cbdda3d4a5e46b3246496d 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:45:21 +0900 Subject: [PATCH 32/52] =?UTF-8?q?main.yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 12 +++++++++++- src/pages/signature/main/MySignaturePage.jsx | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16bf7563..0b60446a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,16 @@ jobs: - name: Check Node v run: node -v + - name: .env setting + run: | + 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 + - name: Install dependencies run: yarn @@ -27,7 +37,6 @@ jobs: run: yarn run build - name: Deploy - run: aws s3 cp --recursive --region ap-northeast-2 ./dist s3://here---you env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -38,3 +47,4 @@ 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 diff --git a/src/pages/signature/main/MySignaturePage.jsx b/src/pages/signature/main/MySignaturePage.jsx index 9b4f7df0..b1a1a439 100644 --- a/src/pages/signature/main/MySignaturePage.jsx +++ b/src/pages/signature/main/MySignaturePage.jsx @@ -8,7 +8,7 @@ const MySignaturePage = () => { const { data: signaturePreview, loading, error } = useSignaturePreview(); return ( - {loading ? ( + {ssloading ? ( {new Array(10).fill(0).map(() => ( From c3425883442cc450dd4e7b6a1ea4ac5f11b06c95 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:49:53 +0900 Subject: [PATCH 33/52] =?UTF-8?q?feat:=20MySignaturePage=20=EB=A1=9C?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/signature/main/MySignaturePage.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signature/main/MySignaturePage.jsx b/src/pages/signature/main/MySignaturePage.jsx index b1a1a439..9b4f7df0 100644 --- a/src/pages/signature/main/MySignaturePage.jsx +++ b/src/pages/signature/main/MySignaturePage.jsx @@ -8,7 +8,7 @@ const MySignaturePage = () => { const { data: signaturePreview, loading, error } = useSignaturePreview(); return ( - {ssloading ? ( + {loading ? ( {new Array(10).fill(0).map(() => ( From b266c81f978aeb16ccbe3f24aad7e1032223f170 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 34/52] 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 708b9f0b6c6a5a5f0232ee33c59c4d4ababc6125 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 35/52] =?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 c34f1f3b3f30c1324faedf106dc615f9a33e019b 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 36/52] =?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 c139366a3b1ea81fb55a9e430fd3745e2a927045 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 37/52] =?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 1eb439691280bc82a96114834638bd11a4d985ed 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 38/52] =?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 27a1a66d62ae2b2cace93b9030bf28fea4142aab Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 01:05:53 +0900 Subject: [PATCH 39/52] =?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 c2cc194c258f364685c8a4857c4c3d7d3c652db9 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:06:01 +0900 Subject: [PATCH 40/52] =?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 | 15 ++++-- src/pages/signature/main/MySignaturePage.jsx | 7 +++ 5 files changed, 46 insertions(+), 36 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 210b401d..f8e7ab7d 100644 --- a/src/pages/signature/SignaturePage.jsx +++ b/src/pages/signature/SignaturePage.jsx @@ -1,12 +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 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); @@ -21,7 +24,7 @@ export default function SignaturePage() { { - if (selectedHeader === '작성하기') { + if (selectedHeader === '작성하기' && isLogin) { if ( !confirm( '지금 작성 중인 모든 내용이 사라집니다.\n내 시그니처로 이동할까요?', @@ -40,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 bae681d09a2f1d428c3a70f418fb44564f9cffa9 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:25:40 +0900 Subject: [PATCH 41/52] =?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 2f500d48a758d79a6af72384d5226aafcbdc818b Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:39:27 +0900 Subject: [PATCH 42/52] =?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 916a7ef7649b7af79ed2c0509ec1a21824b7bea3 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 02:47:41 +0900 Subject: [PATCH 43/52] =?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 902f6c9261fffbb35bfeab8e058acefc27a196f6 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 03:12:20 +0900 Subject: [PATCH 44/52] =?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 51b177245ff48c92581c161460594f13a29ae3a1 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 45/52] =?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 d70c01c63ee4ba5b56a360d70289aa74bf02513e 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 46/52] =?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 2af94d718ae8598f772dc99bf249d15aa7ebb3e3 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 47/52] =?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 3aac6dc1f016cc45c790049c751c38ed8480d6c8 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 05:17:40 +0900 Subject: [PATCH 48/52] =?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 9afc341a5d9de7d81571ee4267fd080f56534400 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 13:02:00 +0900 Subject: [PATCH 49/52] =?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 ad8779baa6489ec5174d0513835ed52b16d21698 Mon Sep 17 00:00:00 2001 From: chaKK Date: Sun, 18 Feb 2024 17:14:13 +0900 Subject: [PATCH 50/52] =?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 26eb87ea52c381edc6c35adee6a12a3a5e70a131 Mon Sep 17 00:00:00 2001 From: kimjunha Date: Sat, 17 Feb 2024 16:02:22 +0900 Subject: [PATCH 51/52] =?UTF-8?q?[Docs]=20:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/home/useLoadMonthlyJourney.js | 29 -------------------- src/hooks/mate/useExploreMate.js | 28 ------------------- src/hooks/mate/useParticipateTeamMate.js | 28 ------------------- src/hooks/mate/useSearchMate.js | 28 ------------------- src/hooks/signature/useDeleteMySignature.js | 29 -------------------- src/hooks/signature/useLikeSignature.js | 29 -------------------- src/hooks/signature/useUpdateMySignature.js | 30 --------------------- 7 files changed, 201 deletions(-) delete mode 100644 src/hooks/home/useLoadMonthlyJourney.js delete mode 100644 src/hooks/mate/useExploreMate.js delete mode 100644 src/hooks/mate/useParticipateTeamMate.js delete mode 100644 src/hooks/mate/useSearchMate.js delete mode 100644 src/hooks/signature/useDeleteMySignature.js delete mode 100644 src/hooks/signature/useLikeSignature.js delete mode 100644 src/hooks/signature/useUpdateMySignature.js diff --git a/src/hooks/home/useLoadMonthlyJourney.js b/src/hooks/home/useLoadMonthlyJourney.js deleted file mode 100644 index 323f6ae3..00000000 --- a/src/hooks/home/useLoadMonthlyJourney.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { loadMonthlySchedule } from '@/apis/request/home'; - -export const useLoadMonthlyJourney = (year, month) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await loadMonthlySchedule(year, month); - const data = res.data.data; - setData(data); - } catch (e) { - console.log(e); - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useExploreMate.js b/src/hooks/mate/useExploreMate.js deleted file mode 100644 index 8e2d2a3e..00000000 --- a/src/hooks/mate/useExploreMate.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getExploreMate } from '@/apis/request/mate'; - -export const useExploreMate = userId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getExploreMate(userId); - const data = res.data.data.recommend_mates; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [userId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useParticipateTeamMate.js b/src/hooks/mate/useParticipateTeamMate.js deleted file mode 100644 index 661c28b2..00000000 --- a/src/hooks/mate/useParticipateTeamMate.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getParticipateTeamMate } from '@/apis/request/mate'; - -export const useParticipateTeamMate = ruleId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getParticipateTeamMate(ruleId); - const data = res.data.data.mates; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [ruleId]); - - return { data, loading, error }; -}; diff --git a/src/hooks/mate/useSearchMate.js b/src/hooks/mate/useSearchMate.js deleted file mode 100644 index 3b77dcec..00000000 --- a/src/hooks/mate/useSearchMate.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { getSearchMate } from '@/apis/request/mate'; - -export const useSearchMate = (searchTerm, cursor, take) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await getSearchMate(searchTerm, cursor, take); - const data = res.data.data.mates; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, [searchTerm, cursor, take]); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useDeleteMySignature.js b/src/hooks/signature/useDeleteMySignature.js deleted file mode 100644 index 8c616152..00000000 --- a/src/hooks/signature/useDeleteMySignature.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { deleteMySignature } from '@/apis/request/signature'; - -// 시그니처 삭제하기 -export const useDeleteMySignature = signatureId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await deleteMySignature(signatureId); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useLikeSignature.js b/src/hooks/signature/useLikeSignature.js deleted file mode 100644 index 61d24313..00000000 --- a/src/hooks/signature/useLikeSignature.js +++ /dev/null @@ -1,29 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { likeSignature } from '@/apis/request/signature'; - -// 시그니처 좋아요 -export const useLikeSignature = signatureId => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await likeSignature(signatureId); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; diff --git a/src/hooks/signature/useUpdateMySignature.js b/src/hooks/signature/useUpdateMySignature.js deleted file mode 100644 index fdb718d8..00000000 --- a/src/hooks/signature/useUpdateMySignature.js +++ /dev/null @@ -1,30 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { updateMySignature } from '@/apis/request/signature'; - -//시그니처 수정하기 -export const useUpdateMySignature = (signatureId, { patchData }) => { - const [data, setData] = useState([]); - const [loading, setLoading] = useState(false); - const [error, setError] = useState(false); - - useEffect(() => { - const fetchData = async () => { - try { - setLoading(true); - const res = await updateMySignature(signatureId, { patchData }); - const data = res.data.data; - setData(data); - } catch (e) { - setError(e.message || '에러가 발생했습니다.'); - } finally { - setLoading(false); - } - }; - - fetchData(); - }, []); - - return { data, loading, error }; -}; -s; From 2894add18b12e62786d4e70ab2b387ec4d2587bc 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 00:37:23 +0900 Subject: [PATCH 52/52] =?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/hooks/home/useLoadMonthlyJourney.js | 29 ++++++++++++++++++++ src/hooks/mate/useExploreMate.js | 28 +++++++++++++++++++ src/hooks/mate/useParticipateTeamMate.js | 28 +++++++++++++++++++ src/hooks/mate/useSearchMate.js | 28 +++++++++++++++++++ src/hooks/signature/useDeleteMySignature.js | 29 ++++++++++++++++++++ src/hooks/signature/useLikeSignature.js | 29 ++++++++++++++++++++ src/hooks/signature/useUpdateMySignature.js | 30 +++++++++++++++++++++ src/pages/mate/ruleEdit/RuleEdit.jsx | 1 - 8 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 src/hooks/home/useLoadMonthlyJourney.js create mode 100644 src/hooks/mate/useExploreMate.js create mode 100644 src/hooks/mate/useParticipateTeamMate.js create mode 100644 src/hooks/mate/useSearchMate.js create mode 100644 src/hooks/signature/useDeleteMySignature.js create mode 100644 src/hooks/signature/useLikeSignature.js create mode 100644 src/hooks/signature/useUpdateMySignature.js diff --git a/src/hooks/home/useLoadMonthlyJourney.js b/src/hooks/home/useLoadMonthlyJourney.js new file mode 100644 index 00000000..323f6ae3 --- /dev/null +++ b/src/hooks/home/useLoadMonthlyJourney.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { loadMonthlySchedule } from '@/apis/request/home'; + +export const useLoadMonthlyJourney = (year, month) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await loadMonthlySchedule(year, month); + const data = res.data.data; + setData(data); + } catch (e) { + console.log(e); + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useExploreMate.js b/src/hooks/mate/useExploreMate.js new file mode 100644 index 00000000..8e2d2a3e --- /dev/null +++ b/src/hooks/mate/useExploreMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getExploreMate } from '@/apis/request/mate'; + +export const useExploreMate = userId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getExploreMate(userId); + const data = res.data.data.recommend_mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [userId]); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useParticipateTeamMate.js b/src/hooks/mate/useParticipateTeamMate.js new file mode 100644 index 00000000..661c28b2 --- /dev/null +++ b/src/hooks/mate/useParticipateTeamMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getParticipateTeamMate } from '@/apis/request/mate'; + +export const useParticipateTeamMate = ruleId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getParticipateTeamMate(ruleId); + const data = res.data.data.mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [ruleId]); + + return { data, loading, error }; +}; diff --git a/src/hooks/mate/useSearchMate.js b/src/hooks/mate/useSearchMate.js new file mode 100644 index 00000000..3b77dcec --- /dev/null +++ b/src/hooks/mate/useSearchMate.js @@ -0,0 +1,28 @@ +import { useEffect, useState } from 'react'; + +import { getSearchMate } from '@/apis/request/mate'; + +export const useSearchMate = (searchTerm, cursor, take) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await getSearchMate(searchTerm, cursor, take); + const data = res.data.data.mates; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, [searchTerm, cursor, take]); + + return { data, loading, error }; +}; diff --git a/src/hooks/signature/useDeleteMySignature.js b/src/hooks/signature/useDeleteMySignature.js new file mode 100644 index 00000000..8c616152 --- /dev/null +++ b/src/hooks/signature/useDeleteMySignature.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { deleteMySignature } from '@/apis/request/signature'; + +// 시그니처 삭제하기 +export const useDeleteMySignature = signatureId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await deleteMySignature(signatureId); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/signature/useLikeSignature.js b/src/hooks/signature/useLikeSignature.js new file mode 100644 index 00000000..61d24313 --- /dev/null +++ b/src/hooks/signature/useLikeSignature.js @@ -0,0 +1,29 @@ +import { useEffect, useState } from 'react'; + +import { likeSignature } from '@/apis/request/signature'; + +// 시그니처 좋아요 +export const useLikeSignature = signatureId => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await likeSignature(signatureId); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; diff --git a/src/hooks/signature/useUpdateMySignature.js b/src/hooks/signature/useUpdateMySignature.js new file mode 100644 index 00000000..fdb718d8 --- /dev/null +++ b/src/hooks/signature/useUpdateMySignature.js @@ -0,0 +1,30 @@ +import { useEffect, useState } from 'react'; + +import { updateMySignature } from '@/apis/request/signature'; + +//시그니처 수정하기 +export const useUpdateMySignature = (signatureId, { patchData }) => { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(false); + + useEffect(() => { + const fetchData = async () => { + try { + setLoading(true); + const res = await updateMySignature(signatureId, { patchData }); + const data = res.data.data; + setData(data); + } catch (e) { + setError(e.message || '에러가 발생했습니다.'); + } finally { + setLoading(false); + } + }; + + fetchData(); + }, []); + + return { data, loading, error }; +}; +s; 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(() => {