Skip to content

Commit

Permalink
[fix] date available 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
zestlee1106 committed Dec 20, 2023
1 parent 319fcc0 commit 252adcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/RoomCard/RoomCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ const Footer = ({ room, isLikedRooms }: CardProps) => {
{room.roomInfo.roommates} housemates in total
</div>
<hr />
<p className="pt-[10px] font-medium text-[12px] text-a2">Available {formatDate(room.availableDate)}</p>
<p className="pt-[10px] font-medium text-[12px] text-a2">
Available {room.available === true ? formatDate(room.availableDate) : 'Now'}
</p>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion pages/room/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export default function RoomDetail() {
</div>
<div className="flex items-center">
<Calendar className="mr-[12px]" />
From {formatDate(room.availableDate)}
{room.available === true ? `From ${formatDate(room.availableDate)}` : 'Available Now'}
</div>
</div>
<hr />
Expand Down
1 change: 1 addition & 0 deletions public/types/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export interface RoomSearch {
roomInfo: RoomInfo;
furnishings: FurnishingData[];
availableDate: string;
available: boolean;
description: string;
images?: ImageFile[];
imageFiles?: ImageFile[];
Expand Down

0 comments on commit 252adcb

Please sign in to comment.