Skip to content

[#54] 아이템 상세 페이지 디자인 수정 !#85

Merged
halionaz merged 9 commits into
devfrom
fix/#54/item-detail
Jul 17, 2025
Merged

[#54] 아이템 상세 페이지 디자인 수정 !#85
halionaz merged 9 commits into
devfrom
fix/#54/item-detail

Conversation

@halionaz

@halionaz halionaz commented Jul 16, 2025

Copy link
Copy Markdown
Member

❗ 연관 이슈

📌 내용

  • 짜잔
  • 상세 페이지 디자인 변경사항을 적용했음

기본 상세 페이지 화면

Screenshot 2025-07-17 at 4 19 05 AM
  • 좋아요랑 댓글 개수 이제 정상적으로 표시됨
  • 언제 올린건지 알잘딱하게 표시해줌 (3분전... O시간전... 1일전... 1년전 등등)
  • 위에 케밥 메뉴 누르면 일단 본인 게시글은 삭제할 수 있게 만들어둠 (당연히 임시)
  • 사진엔 안나오긴 했는데 이제 대여랑 판매 둘다 해두면 가격 모두 표시됨

좋아요 누르기

Screenshot 2025-07-17 at 4 19 12 AM
  • 이제 좋아요가 눌러짐
  • 누르면 바로 아래쪽 숫자에도 반영, 바깥 리스트에도 반영됨

그외 짜잘한 수정

Screenshot 2025-07-17 at 4 19 43 AM
  • 이제 줄바꿈이 잘 표시됨

    • 원래는 줄바꿈 아무리 많이 해도 그냥 하나로 퉁쳐서 표시해주는 버그가 있었음 (사실 이게 맞는 동작인가? 선생님 생각도 궁금)
    • 이제 아이템에 달려있는 모든 태그들이 표시됨.
      • 아직 바뀐 디자인은 적용 안함 (공용 컴포넌트라 충돌 있을거 같아서 얘는 브랜치 따로 팔게연) 다행히 취소됐다고 함
  • 하는 김에 /hooks/apis에 있던 api 관련 훅들 그냥 /apis로 옮겼어요 /hooks에는 진짜 훅들만 저장할라꼬

☑️ 체크 사항 & 논의 사항

  • 바텀바는 뒤집어도 바텀바는 다른 브랜치로 만들고 있어서 구현이 안되어있음 (채팅이랑 픽으로 가는 버튼 있는 그거)
  • 위에 설명한 사항들 다 잘 적용 됐는지
  • 피디같

@halionaz halionaz requested review from Copilot and jw0202058 July 16, 2025 19:32
@halionaz halionaz self-assigned this Jul 16, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR applies design updates and feature enhancements to the item detail page, including layout adjustments, interactive buttons, and utility additions.

  • Refactored API hook imports and propagated new props (itemId, isMine, isLiked) through DetailPage to child components
  • Added like/delete functionality, relative-time display, and dynamic price/token rendering in detail components
  • Updated CSS using cva, replaced custom VerifiedTag with SchoolVerifiedTag, and introduced new utility functions

Reviewed Changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pages/DetailPage/index.tsx Updated hook import path; passed itemId, isMine, isLiked
src/features/home/components/RecentList/index.tsx Updated hook import path
src/features/detail/components/UserInfo/style.css.ts Migrated LikeButton to cva; removed VerifiedTag CSS
src/features/detail/components/UserInfo/index.tsx Replaced inline VerifiedTag with SchoolVerifiedTag; implemented like button logic
src/features/detail/components/PostContent/style.css.ts Added lineClamp, flex layout for price, and white-space handling
src/features/detail/components/PostContent/index.tsx Rendered rental/sale prices conditionally; integrated relative-time and ItemTokenList
src/features/detail/components/DetailHeader/index.tsx Added useDeleteItem hook and conditional delete button for owner
src/features/detail/apis/usePostLike.ts New mutation hook for liking items
src/features/detail/apis/useDeleteItem.ts New mutation hook for deleting items
src/common/utils/toKST.ts New utility converting UTC dates to KST
src/common/utils/getKoreanRelativeTime.ts New utility for Korean relative time display
src/common/components/SchoolVerifiedTag/style.css.ts New CSS for the school-verified tag
src/common/components/SchoolVerifiedTag/index.tsx New component for school-verified tag
src/common/components/ItemTokenList/index.tsx New component aggregating item tokens
Comments suppressed due to low confidence (2)

src/common/utils/getKoreanRelativeTime.ts:5

  • [nitpick] The parameter a is ambiguous. Rename it to date or timestamp to improve readability and clarity.
export const getKoreanRelativeTime = (a: Date) => {

src/common/utils/getKoreanRelativeTime.ts:1

  • This new relative time utility lacks accompanying tests. Consider adding unit tests covering boundary cases (seconds, minutes, hours, etc.) to ensure correctness.
/**

)}
</div>
)}
{isSale && (

Copilot AI Jul 16, 2025

Copy link

Choose a reason for hiding this comment

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

The sale price block is rendered twice when both isRental and isSale are true—once inside the rental wrapper and once afterwards. Consider removing the nested sale conditional or merging both into a single conditional block.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

둘다 되는거 맞다 피그마 다시 읽고 와라

Comment thread src/features/detail/components/UserInfo/index.tsx
Comment thread src/features/detail/components/DetailHeader/index.tsx Outdated
Comment thread src/features/detail/components/PostContent/index.tsx
halionaz and others added 3 commits July 17, 2025 04:45
vsc 키기 귀찮아

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
vsc키기귀찮아

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@halionaz

Copy link
Copy Markdown
Member Author

마지막 커밋 메세지가 왜 저러지 졸면서 썼나

@jw0202058

Copy link
Copy Markdown
Collaborator

그니까 보고 놀랐어

@jw0202058 jw0202058 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

좋네예

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

빼주셨군요 감사합니다

},
});
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

아 그냥 바로 지워지는 거였구나 먼가 했네

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

임시로다가 그렇게 해두었습니다

fontWeight: 600,
lineHeight: 1.4,
letterSpacing: '-0.045rem',
lineClamp: 2,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

흠 이거 post에서 글자수 제한 받아야겠지

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

아마 필요할꺼 같음
기본 길이제한이 서버쪽에도 있더라
근데 노션에 정리해둔 길이제한으로 프론트에서도 한번 막아주는 게 좋을듯

@jw0202058 jw0202058 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

좋네예

@halionaz

Copy link
Copy Markdown
Member Author

머지!머지!머지!

@halionaz halionaz merged commit 06f235a into dev Jul 17, 2025
@halionaz halionaz deleted the fix/#54/item-detail branch July 17, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants