Skip to content

Commit

Permalink
♻️ Refactor: post 디테일 페이지 이동 코드 수정 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-paik committed Jun 26, 2023
1 parent d40cef7 commit df4659d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/PostPage/PostDetailPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from 'react';
import { useLocation, useParams } from 'react-router-dom';
import { useLocation } from 'react-router-dom';
import PostPage from './PostPage';
import styled, { keyframes, css } from 'styled-components';
import { getComment, postComment } from '../../utils/Apis';
Expand All @@ -11,12 +11,12 @@ import IconPostModal from '../../components/common/Modal/IconPostModal';

const PostPageDetail = () => {

const postId = useParams().id;
const [commentData, setCommentData] = useState();
const [inputComment, setInputComment] = useState('');
const location = useLocation();
const data = location.state?.data;
const postId = location.state?.data.id;

const [commentData, setCommentData] = useState();
const [inputComment, setInputComment] = useState('');
const [isModalOpen, setIsModalOpen] = useState(false);
const [modalTopText, setModalTopText] = useState();
const [modalBtmText, setModalBtmText] = useState();
Expand Down

0 comments on commit df4659d

Please sign in to comment.