Skip to content

Commit

Permalink
Merge pull request #212 from FinalDoubleTen/FE-89--feat/Trips/TripsMap
Browse files Browse the repository at this point in the history
계획 정보 소켓 연결
  • Loading branch information
suehub authored Jan 20, 2024
2 parents c8a42e2 + 0b7b7fe commit 2743ba8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions src/components/Plan/PlanSchedule.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { UserIcon } from '@components/common/icons/Icons';
import { socketContext } from '@hooks/useSocket';
import { useContext } from 'react';

const PlanSchedule = () => {
const { tripInfo } = useContext(socketContext);
const trip = tripInfo?.data;

return (
<div className="my-5">
<div className="flex items-center justify-between">
<div className="flex items-center">
<div className="title1 mb-[10px] mr-1">{trip?.tripName}</div>
<div className="flex items-center pb-[10px]">
<UserIcon size={20} fill="#888" color="#888" />
<span className="body4 pt-[1px] text-gray4">
{trip?.numberOfPeople}
</span>
</div>
</div>
</div>
<span className="body1 text-gray4">
{trip?.startDate} ~ {trip?.endDate}
</span>
</div>
);
};

export default PlanSchedule;
4 changes: 2 additions & 2 deletions src/components/Plan/PlanSectionTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useRecoilValue, useRecoilState } from 'recoil';
import { dayState, dateState } from '@recoil/plan';
import { tripIdState, memberIdState } from '@recoil/socket';
import { calculateDayAndDate } from '@utils/utils';
import { TripSchedule } from '@components/Trip/TripSchedule';
import PlanSchedule from './PlanSchedule';

const PlanSectionTop = () => {
const navigate = useNavigate();
Expand Down Expand Up @@ -57,7 +57,7 @@ const PlanSectionTop = () => {
}}
/>
<TripRealtimeEditor />
<TripSchedule />
<PlanSchedule />
<TripBudget />
<Tab
lists={DayArr}
Expand Down

0 comments on commit 2743ba8

Please sign in to comment.