Skip to content

Commit

Permalink
Chore: add diary id recoil in invite friend page #116
Browse files Browse the repository at this point in the history
  • Loading branch information
seo0o519 committed May 27, 2024
1 parent 95c8698 commit 7afab39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/InviteFriendPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import FriendList from "../components/common/FriendList.js";
import copyIcon from "../assets/icons/copy.svg";
import xicon from "../assets/icons/x-icon.svg";
import BottomNav from "../layout/BottomNav";
import { useNavigate, useLocation } from "react-router-dom";
import { useNavigate } from "react-router-dom";
import Modal from "../components/common/Modal";
import SuccessCopyContent from "../components/common/SuccessCopyContent.js";
import { tripIdState } from "../recoil/commonState";
import { useRecoilValue } from "recoil";

const InviteFriendPage = () => {
const SERVER_URL = process.env.REACT_APP_SERVER_URL;
const navigate = useNavigate();

// navigate 하면서 받은 travel id 값
const { state } = useLocation();
// const travelID = state; <----------------나중에 주석 풀고 다음 줄 지우기
const travelID = "664c951554d29fb5ec75847b"; // 임시로 쓴 것
const travelID = useRecoilValue(tripIdState);
// travel의 정보
const [invitecode, setInvitecode] = useState("");
const [title, setTitle] = useState("");
Expand Down

0 comments on commit 7afab39

Please sign in to comment.