Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions components/Link/LinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const LinkCard = ({ openEdit, openDelete, info }: LinkCardProps) => {
alt="링크 미리보기"
fill
/>
{/* isFavoritePage일 때만 즐겨찾기 버튼 렌더링 */}
{/* 즐겨찾기 페이지가 아닐 때에는 즐겨찾기 버튼 렌더링x */}
{!isFavoritePage && (
<div
onClick={() => setIsSubscribed(!isSubscribed)}
Expand Down Expand Up @@ -94,12 +94,10 @@ const LinkCard = ({ openEdit, openDelete, info }: LinkCardProps) => {
</div>
)}
</div>
<div className="text-[black100] text-lg ">
<div className="text-black100 y-[42px] line-clamp-2">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css 로는 적용할 게 많았는데 tailwind는 간편한 게 있네요 ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그니까여 ㅎㅎ

{info.description || "설명"}
</div>
<div className="text-sm text-[black200]">
{formattedDate || "2024.11.06"}
</div>
<div className="text-sm">{formattedDate || "2024.11.06"}</div>
</section>
</div>
);
Expand Down
8 changes: 5 additions & 3 deletions util/timAgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ function timeAgo(createdAt: string): string {
);
const minutesDiff = Math.floor(secondsDiff / 60);
const hoursDiff = Math.floor(minutesDiff / 60);
const daysDiff = Math.floor(hoursDiff / 24); //
const daysDiff = Math.floor(hoursDiff / 24);

if (hoursDiff < 1) {
if (minutesDiff < 1) {
return `${secondsDiff}초 전`;
} else if (hoursDiff < 24) {
} else if (hoursDiff < 1) {
return `${minutesDiff}분 전`;
} else if (daysDiff < 1) {
return `${hoursDiff}시간 전`;
} else {
return `${daysDiff}일 전`;
Expand Down
Loading