Skip to content

Commit

Permalink
Merge: merge from feature/138 to main
Browse files Browse the repository at this point in the history
Chore: clear code
  • Loading branch information
seo0o519 authored May 28, 2024
2 parents 52b8ce8 + 67c2abb commit 4ac9479
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/components/common/DiaryList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import DiaryListItem from "./DiaryListItem";
import { PropTypes } from "prop-types";

export default function TripTable(props) {
console.log(props);
return (
<StTripTable>
{
Expand Down
3 changes: 0 additions & 3 deletions src/components/common/ImageUploader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useState ,useRef} from "react";
import PropTypes from "prop-types";
import { AiFillCamera } from "react-icons/ai";
// import axios from "axios";

const ImageUploader = ({onChange, url}) => {
const [selectedFile, setSelectedFile] = useState(null);
Expand All @@ -14,8 +13,6 @@ const ImageUploader = ({onChange, url}) => {
const file = e.target.files[0];
setSelectedFile(file);
if(file){
// const img = new FormData();
// img.append("file", file);
const reader = new FileReader();
reader.onload = () => {
setPreviewUrl(reader.result);
Expand Down
1 change: 0 additions & 1 deletion src/components/common/TripListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default function TripListItem(props) {
};

const goToEdit = () => {
console.log(props.data);
navigate("/edittrip", { state: {state: props.data, url: props.url }});
};

Expand Down
3 changes: 0 additions & 3 deletions src/pages/AddTripPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ const AddTripPage = () => {
const enddate = moment(endDate)
.endOf("day")
.format("YYYY-MM-DDTHH:mm:ss.SSS[Z]");
console.log("---");
console.log(startdate);
console.log(enddate);
const formData = new FormData();
formData.append("title", tripName);
formData.append("startdate", startdate);
Expand Down
1 change: 0 additions & 1 deletion src/pages/CalendarPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const CalendarPage = () => {
axios
.get(`${SERVER_URL}/diary`, { withCredentials: true })
.then((res) => {
console.log(res);
const transformedData = res.data.diarys_info.map((item) => {
return {
date: item.diary.date,
Expand Down
1 change: 0 additions & 1 deletion src/pages/DiaryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const DiaryPage = () => {
const closeModal = () => {
axios.delete(`${process.env.REACT_APP_SERVER_URL}/diary/${diaryId}`, { withCredentials: true})
.then((res) => {
// console.log(res);
})
.catch((error) => {
console.log(error);
Expand Down
3 changes: 0 additions & 3 deletions src/pages/EditProfilPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ const EditProfilPage = () => {
};

const handleSubmit = (e) => {
//db에 바뀐 이름 post해서 반영
//db에 이미지 formdata로 반영
//변경된 이름은 메인페이지, 작성자, 등에서 모두 바뀌어야 하는데.. 되는 건가? 그렇다!
const formData = new FormData();
formData.append("name", user);
if (selectedFile) {
Expand Down
1 change: 0 additions & 1 deletion src/pages/InviteFriendPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const InviteFriendPage = () => {
axios
.get(`${SERVER_URL}/travel/${tripId}`)
.then((res) => {
console.log(res);
// 초대 코드 저장
setInvitecode(res.data.travel.ivtoken);
// 여행 제목 저장
Expand Down
1 change: 0 additions & 1 deletion src/pages/JoinTripPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const JoinTripPage = () => {
//success join modal 닫기
const closeSuccessModal = () => {
setIsSuccessModal(false);
// navigate("/triptable", { state:travelId});
};

return (
Expand Down
1 change: 0 additions & 1 deletion src/pages/MapPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const MapPage = () => {
if (!completed) {
setData(result.data.travels);
setUrl(result.data.travelUrls);
// console.log(url);
}
setLoading(true);
}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/MypagePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const MypagePage = () => {
const [diaryID, setDiaryId] = useRecoilState(diaryIdState);

const toggleModal = () => {
console.log(isModalOpen);
setIsModalOpen(!isModalOpen);
};

Expand Down Expand Up @@ -115,7 +114,6 @@ const MypagePage = () => {
})
.then((response) => {
const status = response.status;
console.log("res", status);
if (status === 200) {
setTripName("");
setTripId("");
Expand Down

0 comments on commit 4ac9479

Please sign in to comment.