Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5431380
[Docs]: 캘린더, 지도 빼고 완료..
kimjunha1231 Feb 17, 2024
d8aff73
[Docs]:여행규칙 빼고 메이트 완료
kimjunha1231 Feb 17, 2024
bb27e05
[Docs]: 일정 불러오는 쪽 빼고 완료
kimjunha1231 Feb 18, 2024
456bc8f
[Feat]:탐색 페이지도 msw연결
kimjunha1231 Feb 18, 2024
173294c
[Docs]: 필요없는 줄 제거
kimjunha1231 Feb 18, 2024
ef5f8ed
feat: main.yml
dydals3440 Feb 17, 2024
46d64a9
feat: main.yml AWS S3 CI/CD 환경 구축
dydals3440 Feb 17, 2024
ab36318
feat: main.yml AWS S3 CI/CD 환경 구축
dydals3440 Feb 17, 2024
7f05c3b
feat: main.yml AWS S3 CI/CD 환경 구축
dydals3440 Feb 17, 2024
bc2a85a
feat: main.yml AWS S3 CI/CD 환경 구축
dydals3440 Feb 17, 2024
901dd5b
Style: 모든 텍스트 및 달력 스타일 black 수정
daindaind Feb 17, 2024
8c7208e
Style: 시그니처 로그인 확인, 홈 화면 프로필 배너 스켈레톤 UI 제거
daindaind Feb 17, 2024
4e11d5b
Feat: 메이트 탭 로그인 유무 확인
daindaind Feb 17, 2024
6b62314
Feat: 캘린더 및 지도 로그인 유무 확인
daindaind Feb 17, 2024
e3cd144
Feat: 알림 로그인 유무 확인
daindaind Feb 17, 2024
764c71e
Feat: 마이페이지 유저 정보 로그인 유무 확인
daindaind Feb 17, 2024
f9a61be
feat: 야호 제거
dydals3440 Feb 17, 2024
1bf3fa9
feat: 로그인 삭제 / 카카오 / 구글 로그인 제거
dydals3440 Feb 17, 2024
a380b3f
fix: 기타 에러 수정
dydals3440 Feb 17, 2024
7437dcc
bug: 시그니처 답글 처리, 시그니처 발행 한번만 요청
daindaind Feb 17, 2024
587db0e
bug: schedules 무한스크롤 오류 해결
daindaind Feb 18, 2024
9ce6bf0
bug: bottomDetailScrollPage 무한 스크롤 수정
daindaind Feb 18, 2024
70ca7f0
feat: 게시글의 주인인 경우, 댓글 삭제가 가능하게 로직 변경
dydals3440 Feb 18, 2024
78b128f
feat: Signature Page 수정
dydals3440 Feb 18, 2024
1239ec8
fix: Signature Comment 수정(쓰레기통 2개 보이는 현상)
dydals3440 Feb 18, 2024
6fc96fc
fix: Signature Comment 로직 수정
dydals3440 Feb 18, 2024
d8861b8
feat: Notification 타입별 알림 구분 및 API 연동
dydals3440 Feb 18, 2024
c2ff03b
style: console.log 제거
dydals3440 Feb 18, 2024
9452624
feat: 탐색페이지 data 없을떄 처리
dydals3440 Feb 18, 2024
af65724
feat: 탐색페이지 NoSignature 처리
dydals3440 Feb 18, 2024
a34be33
feat: FollowRedirectPage 제작
dydals3440 Feb 18, 2024
818f503
feat: MateCommentInput 이미지 없을 경우, 로고 이미지로 대체
dydals3440 Feb 18, 2024
29fcd31
[Feat]: 알림msw
kimjunha1231 Feb 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,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 }}
Expand All @@ -47,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 "/*"
2 changes: 1 addition & 1 deletion src/components/bottomSheet/BottomDetailScrollPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottomSheet/BottomDetailScrollPage.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/bottomSheet/BottomScrollPage.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
75 changes: 42 additions & 33 deletions src/components/calendar/TravelCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -17,6 +18,7 @@ const TravelCalendar = ({
setJourneyInfo,
setMonthlyInfo,
}) => {
const { isLogin } = useAuth();
const storedStartDate = localStorage.getItem('startDate');
const storedEndDate = localStorage.getItem('endDate');

Expand Down Expand Up @@ -99,6 +101,9 @@ const TravelCalendar = ({
setJourneyInfo(null);
setJourneyTitle('');
}
} else {
setJourneyInfo(null);
setJourneyTitle('');
}
}
};
Expand Down Expand Up @@ -188,39 +193,43 @@ const TravelCalendar = ({
nextLabel={<S.NextBtn onClick={handleNext}>{'>'}</S.NextBtn>}
/>
</S.CalendarContainer>
<S.IntroductionContainer>
{storedStartDate && storedEndDate ? (
<>
<S.JouneyInfoContainer>
{journeyTitle ? (
<p>🏖️ 선택된 여정 : {journeyTitle}</p>
) : (
<p>새로운 여정을 추가하고 여행 일정을 생성하세요!</p>
)}

<p>
{moment(value).format('YYYY/MM/DD')} ~{' '}
{moment(endDate).format('YYYY/MM/DD')}
</p>
</S.JouneyInfoContainer>
<S.JouneyInfoContainer>
<h3>
Tip.{'\t'}
<span>
일지 작성 <S.Image src={EditLight} />
</span>
버튼을 눌러 일지를 작성하면 지도에서
<br />
이미지로 표시된 위치를 확인할 수 있습니다.
</h3>
</S.JouneyInfoContainer>
</>
) : (
<p>
달력에서 기간을 선택하면 저장된 일정을 확인할 수 있습니다.
</p>
)}
</S.IntroductionContainer>
{isLogin && (
<S.IntroductionContainer>
{storedStartDate && storedEndDate ? (
<>
<S.JouneyInfoContainer>
{journeyTitle ? (
<p>🏖️ 선택된 여정 : {journeyTitle}</p>
) : (
<p>새로운 여정을 추가하고 여행 일정을 생성하세요!</p>
)}

<p>
{moment(value).format('YYYY/MM/DD')} ~{' '}
{moment(endDate).format('YYYY/MM/DD')}
</p>
</S.JouneyInfoContainer>
<S.JouneyInfoContainer>
<h3>
Tip.{'\t'}
<span>
일지 작성 <S.Image src={EditLight} />
</span>
버튼을 눌러 일지를 작성하면 지도에서
<br />
이미지로 표시된 위치를 확인할 수 있습니다.
</h3>
</S.JouneyInfoContainer>
</>
) : !isLogin ? (
<></>
) : (
<p>
달력에서 기간을 선택하면 저장된 일정을 확인할 수 있습니다.
</p>
)}
</S.IntroductionContainer>
)}

<SchedulesView
startDate={moment(value).format('YYYY/MM/DD')}
Expand Down
2 changes: 2 additions & 0 deletions src/components/calendar/TravelCalendar.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useRef, useState } from 'react';
import toast from 'react-hot-toast';

import * as S from './MateCommentInput.style';
import Logo from '/images/mypage/MyPageLogo.svg';
import { postMateRuleComment } from '@/apis/request/mate';
import { useGetMyProfile } from '@/hooks/profile/queries/useGetMyProfile';
import { useMutation, useQueryClient } from '@tanstack/react-query';
Expand Down Expand Up @@ -44,7 +45,7 @@ const MateCommentInput = ({ ruleId }) => {

return (
<S.Container>
<S.Avatar src={myProfile} />
<S.Avatar src={myProfile ? myProfile : Logo} />
<S.CommentInput
id="content"
rows={1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
28 changes: 23 additions & 5 deletions src/components/comment/signature/commentView/SignatureComment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ const SignatureComment = ({ data }) => {
<S.Name>{writer?.name}</S.Name>
<S.LeftContent>
{/* 본인 댓글이거나 게시글 주인인 경우에만 답글 버튼 표시 */}
<S.ReplyBtn onClick={() => setIsReplying(prev => !prev)}>
{isReplying === true ? <TiDeleteOutline /> : <HiReply />}
</S.ReplyBtn>
{isParentComment && (
<S.ReplyBtn onClick={() => setIsReplying(prev => !prev)}>
{isReplying === true ? <TiDeleteOutline /> : <HiReply />}
</S.ReplyBtn>
)}
{/* 본인 댓글인 경우에만 수정 및 삭제 버튼 표시 */}
{writer?.is_writer && !editMode && (
<>
Expand All @@ -123,6 +125,23 @@ const SignatureComment = ({ data }) => {
setEditMode(true);
}}
/>
{!can_delete && ( // can_delete가 false일 때만 쓰레기통 아이콘 표시
<S.Icon
src={Trash}
onClick={async () => {
try {
await deleteReComment({ signatureId, commentId: _id });
} catch (e) {
console.error(e);
}
}}
/>
)}
</>
)}
{/* 모두 삭제하는 권한이 있는 경우. */}
{can_delete &&
!editMode && ( // writer가 아니고, can_delete가 true일 때만 쓰레기통 아이콘 표시
<S.Icon
src={Trash}
onClick={async () => {
Expand All @@ -133,8 +152,7 @@ const SignatureComment = ({ data }) => {
}
}}
/>
</>
)}
)}
{editMode && (
<>
<S.Button
Expand Down
8 changes: 8 additions & 0 deletions src/components/explore/SignatureSearchSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useNavigate } from 'react-router-dom';

import Preview from './Preview';
import * as S from './SignatureSearchSlider.style';
import FollowRedirectPage from '@/pages/explore/followRedirect/FollowRedirectPage';
import NoSignature from '@/pages/signature/main/NoSignature';

const SignatureSearchSlider = ({ data, type, searchTerm }) => {
const navigate = useNavigate();
Expand All @@ -15,6 +17,12 @@ const SignatureSearchSlider = ({ data, type, searchTerm }) => {
<S.Title>"{searchTerm}" 에 관한 시그니처⭐</S.Title>
)}
<S.PreviewContainer>
{data?.length === 0 && (
<S.EmptyContainer>
{type === 'hot' && <NoSignature />}
{type === 'new' && <FollowRedirectPage />}
</S.EmptyContainer>
)}
{data === null ? (
<S.EmptyContainer>
<S.Text>로그인 후</S.Text>
Expand Down
2 changes: 0 additions & 2 deletions src/components/login/LoginButton.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import styled from 'styled-components';

import GoogleLoginButton from './GoogleLoginButton';
import KakaoLoginButton from './KakaoLoginButton';
import { GoogleOAuthProvider } from '@react-oauth/google';
Expand Down
4 changes: 2 additions & 2 deletions src/components/login/SnsLoginButton.style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/components/main/Box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
53 changes: 24 additions & 29 deletions src/components/main/LoginBanner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -20,34 +19,30 @@ export default function LoginBanner({ isLogin }) {

return (
<>
{pendingState ? (
<LoginSkeleton />
) : (
<S.Wrapper>
<S.Container>
{isLogin ? (
<>
<S.Img src={myProfile?.profileImage} />
<S.TextContainer>
<S.Text1>{myProfile?.nickname}님 환영합니다🪐</S.Text1>
<S.ProfileContainer onClick={() => navigate('/mypage')}>
<S.Text2>내 프로필 가기</S.Text2>
<img src={rightIcon} />
</S.ProfileContainer>
</S.TextContainer>
</>
) : (
<>
<S.Img src={profileImg} />
<S.TextWrapper onClick={() => navigate('/login')}>
<S.Text3>3초만에 로그인하기 </S.Text3>
<img width="24px" src={rightIcon} />
</S.TextWrapper>
</>
)}
</S.Container>
</S.Wrapper>
)}
<S.Wrapper>
<S.Container>
{isLogin ? (
<>
<S.Img src={myProfile?.profileImage} />
<S.TextContainer>
<S.Text1>{myProfile?.nickname}님 환영합니다🪐</S.Text1>
<S.ProfileContainer onClick={() => navigate('/mypage')}>
<S.Text2>내 프로필 가기</S.Text2>
<img src={rightIcon} />
</S.ProfileContainer>
</S.TextContainer>
</>
) : (
<>
<S.Img src={profileImg} />
<S.TextWrapper onClick={() => navigate('/login')}>
<S.Text3>3초만에 로그인하기 </S.Text3>
<img width="24px" src={rightIcon} />
</S.TextWrapper>
</>
)}
</S.Container>
</S.Wrapper>
</>
);
}
Loading