Skip to content

Commit

Permalink
Chore: delete unused code #119
Browse files Browse the repository at this point in the history
  • Loading branch information
hummingbbird committed May 27, 2024
1 parent 50460b5 commit a578423
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/common/map/MapDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const MapDrawer = (props) => {
const goToDiary = () => {
setTripName(props.data.title);
setTripId(props.data._id);
// navigate("/triptable", {
// state: { id: props.data._id},
// });
navigate("/triptable");
};
return (
<StMapDrawer>
Expand Down
3 changes: 1 addition & 2 deletions src/pages/DiaryListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Avatar from "@mui/material/Avatar";
import Button from "@mui/material/Button";
import Pencil from "../assets/images/pencil.svg";
import { useNavigate } from "react-router-dom";
// import { useLocation } from "react-router";
import FormatListBulletedIcon from "@mui/icons-material/FormatListBulleted";
import BottomNav from "../layout/BottomNav";
import axios from "axios";
Expand Down Expand Up @@ -35,7 +34,7 @@ export default function DiaryListPage() {
{ withCredentials: true },
);
const Img = await axios.get(
`${process.env.REACT_APP_SERVER_URL}/travel/${location.state.id}`,
`${process.env.REACT_APP_SERVER_URL}/travel/${tripId}`,
{ withCredentials: true },
);
if (!completed) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/DiaryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const DiaryPage = () => {
const closeModal = () => {
axios.delete(`http://localhost:5000/diary/${diaryId}`, { withCredentials: true})
.then((res) => {
console.log(res);
// console.log(res);
})
.catch((error) => {
console.log(error);
Expand Down

0 comments on commit a578423

Please sign in to comment.