Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/FinalDoubleTen/TenTenFE into…
Browse files Browse the repository at this point in the history
… TripsQA/Map
  • Loading branch information
suehub committed Jan 22, 2024
2 parents f250001 + d3f5e18 commit f75b4f9
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/Plan/PlanItemBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const PlanItemBox = ({
if (!item || !paths) {
return <div>Missing data</div>;
}

console.log(paths);
const { tripAuthority } = useGetTripsAuthority();
const { tripId } = useContext(socketContext);

Expand Down Expand Up @@ -122,7 +122,7 @@ const PlanItemBox = ({
{item.category}
</div>
<div className="mt-[15px] text-sm font-bold text-black">
{item.price}
{item.price.toLocaleString()}
</div>
</div>
</div>
Expand All @@ -142,9 +142,15 @@ const PlanItemBox = ({
) : null}
</div>
<div className="mt-[3px]">
{(path.pathInfo.totalDistance / 1000).toFixed(2)}km,{' '}
{path.pathInfo.totalTime}분,{' '}
{path.pathInfo.price.toLocaleString()}
{path.pathInfo.totalDistance < 0 ||
path.pathInfo.totalTime < 0 ||
path.pathInfo.price < 0
? '경로 정보가 없습니다.'
: `${(path.pathInfo.totalDistance / 1000).toFixed(
2,
)}km, ${
path.pathInfo.totalTime
}분, ${path.pathInfo.price.toLocaleString()}원`}
</div>
</div>
</div>
Expand Down

0 comments on commit f75b4f9

Please sign in to comment.