Skip to content

Commit

Permalink
refactor: 수정된 api로 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
khj0426 committed Nov 27, 2023
1 parent 295a8a2 commit a414cec
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/pages/CreatedReviewManagePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLocation } from 'react-router-dom'
import { Header } from '@/components'
import {
useCloseSurvey,
useGetReviewQuestion,
useGetReviewForCreator,
useCheckAllReceiverReceived,
useSendReview,
} from '@/apis/hooks'
Expand All @@ -27,8 +27,8 @@ const CreatedReviewManagePage = () => {
)

//NOTE - 리뷰의 질문을 가져온다!
const { data: getReviewQuestion } = useGetReviewQuestion({
id: reviewId,
const { data: getReviewQuestion } = useGetReviewForCreator({
id: Number(reviewId),
})

const { data: checkAllReceiverReceived } = useCheckAllReceiverReceived({
Expand All @@ -45,7 +45,7 @@ const CreatedReviewManagePage = () => {
const handleClickSendSurvey = () => {
if (
!checkAllReceiverReceived?.success ||
getReviewQuestion.data.status === 'END'
getReviewQuestion?.status === 'END'
) {
//NOTE - 토스트 처리

Expand Down Expand Up @@ -91,14 +91,12 @@ const CreatedReviewManagePage = () => {
</div>

<div className="mx-auto flex w-full max-w-[800px] flex-col px-5 py-7 md:p-10">
<h1 className="text-xl md:text-2xl">
{getReviewQuestion?.data?.title}
</h1>
<h1 className="text-xl md:text-2xl">{getReviewQuestion?.title}</h1>
<h2 className="mt-3 text-sm md:mt-4 md:text-xl">
{getReviewQuestion?.data?.description}
{getReviewQuestion?.description}
</h2>
<div className="mt-7">{REVIEW_MANAGE_TAB_CONTENT[activeTab]}</div>
{getReviewQuestion?.data?.status === 'PROCEEDING' ? (
{getReviewQuestion?.status === 'PROCEEDING' ? (
<button
className={`btn fixed bottom-10 cursor-pointer self-end rounded-md bg-active-orange text-white dark:text-black
`}
Expand All @@ -113,7 +111,7 @@ const CreatedReviewManagePage = () => {
`}
disabled={
!checkAllReceiverReceived?.success ||
getReviewQuestion?.data?.status === 'END'
getReviewQuestion?.status === 'END'
}
onClick={handleClickSendSurvey}
>
Expand Down

0 comments on commit a414cec

Please sign in to comment.