Skip to content

Commit

Permalink
Feat: Plan Info 소켓 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
suehub committed Jan 20, 2024
1 parent bdaab02 commit 0b7b7fe
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 0b7b7fe

Please sign in to comment.