Skip to content

Commit

Permalink
Feat: 내 여행취향 설정하러가기 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
LeHiHo committed Jan 22, 2024
1 parent d530e38 commit 7a9352f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Plan/PlanItemBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const PlanItemBox = ({
<div className="flex w-full flex-col">
<div className="flex h-[87.5px] rounded-lg border border-solid border-[#ededed] bg-white">
<img
className="h-[87px] w-[93px] rounded-bl-lg rounded-tl-lg "
className="h-[87px] w-[93px] rounded-bl-lg rounded-tl-lg"
src={item.thumbnailUrl}
alt="img"
/>
Expand Down
13 changes: 12 additions & 1 deletion src/components/Trip/TripPreference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getTripsSurveyMembers } from '@api/trips';
import { useSetRecoilState, useRecoilState } from 'recoil';
import { participantsState } from '@recoil/trip';
import { useGetTripsAuthority } from '@hooks/useGetTripsAuthority';
import { useNavigate } from 'react-router-dom';

interface RatioBarParams {
value: number;
Expand All @@ -27,8 +28,18 @@ interface PercentageParams {
}

const TripPreferenceButton: React.FC = () => {
const { tripAuthority } = useGetTripsAuthority();
const navigate = useNavigate();
const handleTrip = () => {
if (tripAuthority === 'WRITE') {
navigate('/mypage/survey');
}
};

return (
<button className="mb-[17.5px] mt-[20px] flex w-[335px] items-center rounded-full bg-white px-6 py-4 text-sm">
<button
onClick={handleTrip}
className="mb-[17.5px] mt-[20px] flex w-[335px] items-center rounded-full bg-white px-6 py-4 text-sm">
<div className="flex items-center text-gray6">
<div>
<HeartIcon fill="#888888" color="#888888" size={20} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/mypage/editUserSurvey.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const EditUserSurvey = () => {
<BackBox
showBack
backHandler={() => {
navigate('/mypage');
navigate(-1);
}}>
나의 여행 취향 설정
</BackBox>
Expand Down

0 comments on commit 7a9352f

Please sign in to comment.