Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] QA기간 중 발생하는 버그 수정 #73

Merged
merged 54 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ef7e407
feat: 카카오맵 API 연동
jk6722 Oct 28, 2023
8db3790
Revert 6 feat/#1/design system (#7)
jk6722 Oct 28, 2023
cec2334
Feat/#1/design system (#9)
jk6722 Oct 28, 2023
4ce76c6
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Oct 28, 2023
0446184
chore: 절대 경로 설정
AAminha Oct 28, 2023
c79cb66
chore: zoom 설정
AAminha Oct 28, 2023
40595e3
[CHORE] 디자인 시스템 세팅 (#10)
AAminha Oct 28, 2023
84d86eb
chore: GlobalStyle 내부 css 요소 import 경로 수정
AAminha Oct 28, 2023
5a97b09
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Oct 28, 2023
791ffe4
Feat/#11/header (#12)
jk6722 Oct 30, 2023
3ac3fd7
Feat/#18/programCard (#19)
AAminha Oct 30, 2023
50cdfa6
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Oct 30, 2023
78c8721
Feat/#15/login (#16)
jk6722 Oct 30, 2023
b03f794
Chore/#20/axios setting (#21)
jk6722 Oct 30, 2023
f11865e
Feat/#3/map (#13)
jk6722 Oct 30, 2023
6252535
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Oct 30, 2023
d377432
Feat/#14/main (#22)
jk6722 Nov 1, 2023
fbdf54f
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Nov 1, 2023
6597ce1
Feature/#17/detail (#24)
AAminha Nov 4, 2023
1515fff
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Nov 6, 2023
a933bdb
chore: 중복된 QueryClient 제거
jk6722 Nov 6, 2023
8c41db1
Feat/#25/board (#27)
jk6722 Nov 7, 2023
bf5dd97
Feature/#5/search (#23)
AAminha Nov 10, 2023
8df9210
Feat/#30/my posting (#31)
jk6722 Nov 10, 2023
4cfb12d
Feat/#28/posting detail (#29)
jk6722 Nov 11, 2023
c03710b
Feat/#40/mileage (#41)
jk6722 Nov 18, 2023
3b69398
fix: CustomCalendar 에러 해결
AAminha Nov 18, 2023
e2ea14b
Feat/#37/writing (#38)
jk6722 Nov 18, 2023
1b57986
Feat/#32/signup (#33)
jk6722 Nov 18, 2023
b23020e
Feature/#26/register program (#36)
AAminha Nov 18, 2023
ed32209
Fix/#45/image source (#46)
jk6722 Nov 18, 2023
6c4b804
Merge branch 'main' into develop
jk6722 Nov 18, 2023
d6406cd
Feat/#42/api jaeguk (#48)
jk6722 Nov 19, 2023
95583b2
Feat/#42/api login (#49)
jk6722 Nov 20, 2023
68c4b9d
Feature/#50/about (#51)
AAminha Nov 20, 2023
99db9ac
Feature/#34/profile (#53)
AAminha Nov 21, 2023
23081fb
Feature/#43/api minha (#54)
AAminha Nov 21, 2023
8b27fa8
Feature/#39/dash board (#55)
AAminha Nov 21, 2023
1e2acc4
Feat/#42/api jaeguk (#56)
jk6722 Nov 21, 2023
ac1321b
feat: 꿀팁 페이지 제작 (#58)
AAminha Nov 21, 2023
ff8102e
Feat/#42/api jaeguk (#59)
jk6722 Nov 21, 2023
26ed150
Feature/#52/detail program (#60)
AAminha Nov 21, 2023
14b57f9
Feature/#35/wish list (#61)
AAminha Nov 22, 2023
ec2c8c6
Feat/#42/api jaeguk (#64)
jk6722 Nov 22, 2023
6ee5c20
Fix/#62/minha (#63)
AAminha Nov 22, 2023
92d4663
Feat/#42/api jaeguk (#66)
jk6722 Nov 22, 2023
3528314
Merge branch 'main' into develop
jk6722 Nov 22, 2023
ea9c966
chore: 중복된 import 제거
jk6722 Nov 22, 2023
8817397
fix: 게시물 페이지 없는 속성 참조하는 버그 수정 (#68)
jk6722 Nov 22, 2023
e7529d9
Merge branch 'main' into develop
jk6722 Nov 22, 2023
a728d91
fix: interceptor refresh 조건 변경
jk6722 Nov 22, 2023
9757662
fix: quill 에디터에서 이미지 처리가 어려워 임시 제거
jk6722 Nov 22, 2023
e7bad7f
Merge branch 'develop' of https://github.com/Kusitms-28th-Meet-Up-B/F…
jk6722 Nov 22, 2023
98fce9d
Hotfix/#71/jaeguk (#72)
jk6722 Nov 22, 2023
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
7 changes: 6 additions & 1 deletion src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Axios.interceptors.request.use(
Axios.defaults.headers.common['Authorization'] === undefined
) {
// 만료되었으면
if (
Axios.defaults.url === '/review' ||
Axios.defaults.url === '/archive'
)
return config;
const res = await axios.get(`${ServerURL}/auth/refresh`, {
params: {
refreshToken,
Expand All @@ -43,7 +48,7 @@ Axios.interceptors.request.use(
localStorage.setItem('expireToken', newExpireTime.toString());

Cookies.remove('refreshToken');
Cookies.set('refreshToken', newRefreshToken, { expires: 1 });
Cookies.set('refreshToken', newRefreshToken, { expires: 0.24 });
}
}
return config;
Expand Down
22 changes: 17 additions & 5 deletions src/apis/signup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,30 @@ export const postSignup = async (
try {
switch (isGeneralUser) {
case true:
const res = await Axios.post('/users/register/user', postData, {
const res_user = await Axios.post('/users/register/user', postData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
if (
res?.data?.code === 200 &&
window.confirm('회원가입이 완료되었습니다!')
)
if (res_user?.data?.code === 200) {
window.alert('회원가입이 완료되었습니다!');
navigate('/login');
}
break;
case false:
const res_admin = await Axios.post(
'/users/register/manager',
postData,
{
headers: {
'Content-Type': 'multipart/form-data',
},
},
);
if (res_admin?.data?.code === 200) {
window.alert('회원가입이 완료되었습니다!');
navigate('/login');
}
break;
}
} catch (e) {
Expand Down
10 changes: 10 additions & 0 deletions src/assets/icons/icon-finger-one.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/icon-finger-two.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Header = () => {
imageUrl: '',
role: '',
profileImageUrl: '',
registrationNum: '',
registNum: '',
department: '',
birth: '',
});
Expand Down Expand Up @@ -70,8 +70,13 @@ const Header = () => {
>
<img src={Logo} alt="character" />
</LogoWrapper>
{HeaderData.map(({ main, dropDowns }) => (
<NavBar key={main}>
{HeaderData.map(({ main, mainLink, dropDowns }) => (
<NavBar
key={main}
onClick={() => {
navigate(`${mainLink}`);
}}
>
<H3 $fontColor="#15191D">{main}</H3>
<Dropdown>
{dropDowns.map(({ title, link }, index) => (
Expand Down
2 changes: 1 addition & 1 deletion src/constants/Admin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const DASHBOARD_FILTER = [

export const ADMIN_INFO_TAG: { [key: string]: string } = {
nickName: '기관명',
registrationNum: '사업자등록번호',
registNum: '사업자등록번호',
department: '담당부서명',
name: '담당자명',
loginId: '아이디',
Expand Down
5 changes: 5 additions & 0 deletions src/constants/Header/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ interface DropDown {

interface HeaderDataProps {
main: string;
mainLink: string;
dropDowns: DropDown[];
}

export const HeaderData: HeaderDataProps[] = [
{
main: '갈래 소개',
mainLink: '/about/gallae',
dropDowns: [
{
title: "'갈래' 소개",
Expand All @@ -28,6 +30,7 @@ export const HeaderData: HeaderDataProps[] = [
},
{
main: '프로그램',
mainLink: '/search?programType=전체',
dropDowns: [
{
title: '전체',
Expand All @@ -49,6 +52,7 @@ export const HeaderData: HeaderDataProps[] = [
},
{
main: '활동후기',
mainLink: '/review',
dropDowns: [
{
title: '전체',
Expand All @@ -70,6 +74,7 @@ export const HeaderData: HeaderDataProps[] = [
},
{
main: '자료실',
mainLink: '/archive',
dropDowns: [
{
title: '전체',
Expand Down
9 changes: 3 additions & 6 deletions src/constants/Mileage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ export const TipData: TipDataType[] = [
'회원가입만 해도, 100 마일리지를 드려요.',
'후기를 하나 작성할 때마다 20 마일리지를 드려요.',
'보고서를 하나 작성할 때마다 30 마일리지를 드려요.',
"내가 작성한 후기와 보고서가 '좋아요'를 받으면 5 마일리지를 드려요.",
],
},
{
title: '마일리지는 이렇게 모을 수 있어요!',
title: '마일리지는 이렇게 사용할 수 있어요!',
content: [
'회원가입만 해도, 100 마일리지를 드려요.',
'후기를 하나 작성할 때마다 20 마일리지를 드려요.',
'보고서를 하나 작성할 때마다 30 마일리지를 드려요.',
"내가 작성한 후기와 보고서가 '좋아요'를 받으면 5 마일리지를 드려요.",
'10 마일리지로 다른 사람들의 후기를 볼 수 있어요.',
'15 마일리지로 다른 사람들의 보고서를 볼 수 있어요.',
],
},
];
26 changes: 14 additions & 12 deletions src/pages/DetailPosting/OtherPostings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@ const OtherPostings: React.FC<{ postingType: string }> = ({ postingType }) => {
return (
<Container>
<H3 $fontColor="#15191D">이 게시판 글</H3>
<PostingList>
{postingData[postingType] &&
postingData[postingType].map(
({ title, id }: { title: string; id: number }) => (
<PostingItem key={id}>
<B2Bold $fontColor="#53575C" onClick={() => hanleClick(id)}>
{title}
</B2Bold>
</PostingItem>
),
)}
</PostingList>
{postingData && (
<PostingList>
{postingData[postingType] &&
postingData[postingType].map(
({ title, id }: { title: string; id: number }) => (
<PostingItem key={id}>
<B2Bold $fontColor="#53575C" onClick={() => hanleClick(id)}>
{title}
</B2Bold>
</PostingItem>
),
)}
</PostingList>
)}
<PageBar page={page} setPage={setPage} maxPage={postingData?.totalSize} />
</Container>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/board/PostingList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const PostingList: React.FC<Props> = ({ postingList, linkType }) => {
</TopBarContainer>

<PostingContainer>
{postingList.length > 0 ? (
{postingList?.length > 0 ? (
postingList?.map(data => (
<Posting {...data} key={data.id} linkType={linkType} />
))
Expand All @@ -41,7 +41,7 @@ const PostingList: React.FC<Props> = ({ postingList, linkType }) => {

<WritingButton
onClick={() => {
navigate('write');
navigate(`/${linkType}/write`);
}}
>
<B3Bold $fontColor="#fff">글쓰기</B3Bold>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/login/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const onLoginSuccess = (
imageUrl,
role,
profileImageUrl,
registrationNum,
registNum,
birth,
department,
} = res?.data?.result;
Expand All @@ -62,7 +62,7 @@ export const onLoginSuccess = (
Axios.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;

// refreshToken 쿠키에 저장
Cookies.set('refreshToken', refreshToken, { expires: 1 });
Cookies.set('refreshToken', refreshToken, { expires: 0.24 });

// localStroage에 토큰 만료시간 저장
const expireTime = new Date(currentTime.getTime() + 1 * 60 * 60 * 1000);
Expand All @@ -80,7 +80,7 @@ export const onLoginSuccess = (
phoneNumber,
role,
profileImageUrl,
registrationNum,
registNum,
birth,
department,
});
Expand Down
5 changes: 2 additions & 3 deletions src/pages/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ interface markerDataType {
longitude: number;
photoUrl: string;
programName: string;
recruitStartDate: string;
recruitEndDate: string;
remainDay: string;
userLikeCheck: boolean;
}

Expand Down Expand Up @@ -64,7 +63,7 @@ const MapPage = () => {
refetch={refetch}
cardRef={cardRef}
{...markerData[selected]}
period={`${markerData[selected].recruitStartDate}-${markerData[selected].recruitEndDate}`}
remainDay={markerData[selected].remainDay}
setIsModalOpen={setIsModalOpen}
setSelected={setSelected}
isLiked={markerData[selected].userLikeCheck}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/map/components/MapCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import styled from 'styled-components';

import { B1Bold, B3 } from '../../../style/fonts/StyledFonts';
import { B1Bold } from '../../../style/fonts/StyledFonts';
import LikeButton from '@/components/Button/LikeButton';
import CloseIcon from '@/assets/icons/icon-close.svg';

Expand All @@ -11,7 +11,7 @@ interface Props {
id: number;
photoUrl: string;
programName: string;
period: string;
remainDay: string;
setIsModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
setSelected: React.Dispatch<React.SetStateAction<number>>;
cardRef: React.RefObject<HTMLDivElement>;
Expand All @@ -23,7 +23,7 @@ const MapCard: React.FC<Props> = ({
id,
photoUrl,
programName,
period,
remainDay,
setIsModalOpen,
setSelected,
cardRef,
Expand Down Expand Up @@ -52,8 +52,8 @@ const MapCard: React.FC<Props> = ({
</ImageWrapper>
<BottomContainer>
<TextContainer>
<B1Bold $fontColor="#FF7D2C">{remainDay}</B1Bold>
<B1Bold $fontColor="#15191D">{programName}</B1Bold>
<B3 $fontColor="#8E9398">{period}</B3>
</TextContainer>
<LikeButton
isLike={isLike}
Expand Down
8 changes: 7 additions & 1 deletion src/pages/mileage/components/TipCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { TipData } from '@/constants/Mileage';
import { B2, H3 } from '@/style/fonts/StyledFonts';
import styled from 'styled-components';

import One from '@/assets/icons/icon-finger-one.svg';
import Two from '@/assets/icons/icon-finger-two.svg';

const TipCard: React.FC<{ index: number }> = ({ index }) => {
return (
<Container>
<IconWrapper>
<span>☝️</span>
<img src={index === 0 ? One : Two} alt="" />
</IconWrapper>
<H3 $fontColor="#000">{TipData[index].title}</H3>
<TipContainer>
Expand All @@ -29,6 +32,7 @@ const Container = styled.div`
justify-content: flex-start;

width: 637px;
height: 372px;
padding: 46px 51px;
flex-shrink: 0;

Expand Down Expand Up @@ -59,6 +63,8 @@ const TipContainer = styled.ul`
display: flex;
flex-direction: column;
align-items: flex-start;

padding-top: 20px;
gap: 10px;

> li {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/mileage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const Mileage = () => {
</DropDownWrapper>
</FilterContainer>
<HistoryList histories={myPoint?.points} />
<PageBar page={page} setPage={setPage} maxPage={myPoint.totalPage} />
<PageBar page={page} setPage={setPage} maxPage={myPoint?.totalPage} />
</HistoryContainer>
{/* 마일리지 관련 팁 */}
<TipContainer>
Expand Down
11 changes: 3 additions & 8 deletions src/pages/write/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback, useMemo, useRef } from 'react';
import { useState, useEffect, useCallback, useMemo } from 'react';
import { useNavigate } from 'react-router-dom';
import ReactQuill, { Quill } from 'react-quill';
import styled from 'styled-components';
Expand All @@ -9,7 +9,7 @@ import DropDown from '@/components/DropDown/DropDown';
import InputTags from './components/InputTags';
import RoundedButton from '@/components/Button/RoundedButton';
import { B3 } from '@/style/fonts/StyledFonts';
import { imageHandler, isOkToPost } from './functions';
import { isOkToPost } from './functions';
import { DropDownData } from '@/constants/write';
import InputFile from './components/InputFile';
import { postBoardData, setEditData } from '@/apis/write';
Expand All @@ -19,7 +19,6 @@ import { UserAtom } from '@/recoil/LoginAtom';
Quill.register('modules/imageResize', ImageResize); // 이미지 사이즈 변경 모듈 등록

const Write = () => {
const quillRef = useRef<ReactQuill>(null);
const [selected, setSelected] = useState<string>(''); // 선택된 드롭다운
const [title, setTitle] = useState<string>(''); // 제목
const [content, setContent] = useState<string>(''); // 내용 <HTML>
Expand Down Expand Up @@ -92,12 +91,9 @@ const Write = () => {
[{ header: [1, 2, 3, 4, false] }],
['bold', 'italic', 'underline', 'strike', 'blockquote'],
[{ indent: '-1' }, { indent: '+1' }],
['image'],
// ['image'],
['clean'],
],
handlers: {
image: () => imageHandler(quillRef),
},
},
imageResize: {
parchment: Quill.import('parchment'),
Expand Down Expand Up @@ -129,7 +125,6 @@ const Write = () => {
onChange={setContent}
theme="snow"
modules={modules}
ref={quillRef}
placeholder="내용을 입력해주세요."
/>
<InputTagsWrapper>
Expand Down
2 changes: 1 addition & 1 deletion src/recoil/LoginAtom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const UserAtom = atom<UserInfoType>({
phoneNumber: '',
role: '',
profileImageUrl: '',
registrationNum: '',
registNum: '',
department: '',
birth: '',
},
Expand Down
Loading