Skip to content

Commit

Permalink
#120 refactor: console 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Dec 18, 2024
1 parent 3547fa4 commit 1561d19
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/api/ChallengeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const createChallenge = async (data: FormData): Promise<void | string> =>
const response = await axiosInstance.post('/challenges', data, {
headers: { 'Content-Type': 'multipart/form-data' },
});
console.log(response.data);
// console.log(response.data);
return '';
} catch (error) {
console.error('Error fetching data:', error);
Expand Down Expand Up @@ -37,7 +37,7 @@ export const getSearchChallenge = async (
size: number
): Promise<ChallengeResponse | null> => {
try {
console.log(keyword, category, '로 검색할게요');
// console.log(keyword, category, '로 검색할게요');
const response = await axiosInstance.get(`/challenges/search`, {
params: {
category: category || '', // 빈 문자열은 전체 검색
Expand All @@ -46,7 +46,7 @@ export const getSearchChallenge = async (
size: size,
},
});
console.log('챌린지 전체 데이터', response.data);
// console.log('챌린지 전체 데이터', response.data);
return response.data.data;
} catch (error) {
console.error('Error fetching data:', error);
Expand All @@ -70,7 +70,7 @@ export const deleteChallenge = async (id: string): Promise<void> => {
try {
const response = await axiosInstance.delete(`/challenges/${id}`);

console.log(response);
// console.log(response);
} catch (error) {
console.log('error');
}
Expand All @@ -80,7 +80,7 @@ export const deleteChallenge = async (id: string): Promise<void> => {
export const joinChallenge = async (challengeId: string, dashboardId: string): Promise<void> => {
try {
const response = await axiosInstance.post(`/challenges/${challengeId}/${dashboardId}`);
console.log(response.data);
// console.log(response.data);
} catch (error) {
console.error('Error fetching data:', error);
}
Expand All @@ -91,7 +91,7 @@ export const withdrawChallenge = async (id: string): Promise<void> => {
try {
const response = await axiosInstance.delete(`/challenges/${id}/withdraw`);

console.log(response);
// console.log(response);
} catch (error) {
console.log('error');
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ChallengeCommunityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ChallengeCommunityPage = () => {
const response = await getSearchChallenge(keyword, selectedCategory, pageInfo?.currentPage, 10);

if (response) {
console.log('이만큼 받아옴!', response);
// console.log('이만큼 받아옴!', response);
setChallenges(response.challengeInfoResDto);
setPageInfo(response.pageInfoResDto);
}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/CreateChallengePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ const CreateChallengePage = () => {

// * 폼 제출 핸들러
const handleSubmit = async () => {
console.log(formData);
// 빈 작성란이 있으면 모달창 띄우기
if (validateFormData(formData)) {
openModal('normal'); // 모달 띄우기 (yes/no 모달)
Expand Down Expand Up @@ -224,7 +223,6 @@ const CreateChallengePage = () => {
const responseChallengeId = challengeId
? await patchChallenge(challengeId, data) // 기존 대시보드 수정
: await createChallenge(data); // 새 대시보드 생성

// 챌린지 페이지로 이동
navigate(responseChallengeId ? `/challenge/${responseChallengeId}` : `/challenge`);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MyPage = () => {
queryKey: ['alarmNoti'],
queryFn: getAlarmList,
});
console.log(alarmNoti);
// console.log(alarmNoti);
const { data: followersList } = useFollowersList(0, 8);

const [teamBool, setTeamBool] = useState<string>('personal'); // 기본값으로 팀 탭을 보여줌
Expand Down

0 comments on commit 1561d19

Please sign in to comment.