diff --git a/src/components/climbing/ReviewBoard.tsx b/src/components/climbing/ReviewBoard.tsx index 3638da62..4cc007cf 100644 --- a/src/components/climbing/ReviewBoard.tsx +++ b/src/components/climbing/ReviewBoard.tsx @@ -6,7 +6,6 @@ import AddReactionIcon from '@mui/icons-material/AddReaction'; import useBottomsheet from '@src/hooks/useBottomsheet'; import EmojiList from '@src/components/climbing/EmojiList'; import { useQuery } from '@tanstack/react-query'; -import { ClimbingResponse } from '@src/types/apis/climbing.d'; import { getClimbingReview } from '@src/apis/climbing'; import useLoaderData from '@src/hooks/useRoaderData'; import Chip from '@src/components/common/Tag'; @@ -48,7 +47,7 @@ import { ReactComponent as IcnStar } from '@src/assets/icons/md_star.svg'; const ReviewBoard = () => { const { openBottomsheet } = useBottomsheet(); const { id: climbingId } = useLoaderData<{ id: number }>(); - const { data, isLoading, isError } = useQuery({ + const { data, isLoading, isError } = useQuery({ queryKey: ['climbingReview', climbingId], queryFn: () => getClimbingReview(climbingId), }); @@ -63,8 +62,6 @@ const ReviewBoard = () => { return
No data available
; } - console.log(data); - /* eslint-disable */ return ( {data.hasShared && } diff --git a/src/pages/climbing/ClimbingTerminatePage.tsx b/src/pages/climbing/ClimbingTerminatePage.tsx index fa084ccc..9f7c63a1 100644 --- a/src/pages/climbing/ClimbingTerminatePage.tsx +++ b/src/pages/climbing/ClimbingTerminatePage.tsx @@ -1,23 +1,31 @@ import ClimbingBoard from '@src/components/climbing/ClimbingBoard'; import Header from '@src/components/common/Header'; -import SegmentedButton from '@src/components/climbing/SegmentedButton'; import { useState } from 'react'; import styled from 'styled-components'; import ReviewBoard from '@src/components/climbing/ReviewBoard'; +import SegmentedButton from '@src/components/common/SegmentedButton'; export type ViewType = 'climbing' | 'review'; const ClimbingTerminatePage = ({ name: headerText }: { name: string }) => { - const [selectedView, setSelectedView] = useState('climbing'); + const [selectedView, setSelectedView] = useState('review'); const handleSegmentChange = (value: ViewType) => { setSelectedView(value); }; + const SEGMENTED_BUTTON_CONFIG: { value: ViewType; label: string }[] = [ + { value: 'climbing', label: '클라이밍' }, + { value: 'review', label: '감상평' }, + ]; return ( <>
- + {selectedView === 'climbing' && } {selectedView === 'review' && }