-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#467] 내가 가입한 모임 상세 페이지 #469
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
75be4f0
feat: BackButton 컴포넌트에 'use client' 추가
minjongbaek fc19b66
feat: TopNavigation.LeftItem 컴포넌트에 flex 스타일 추가
minjongbaek 384ffd2
fix: 디자인과 맞지 않던 스타일 수정
minjongbaek 9ef7710
feat: 내가 참여한 모임 페이지 구현
minjongbaek 924e314
feat: DetailBookGroupCard 컴포넌트에서 Title 영역이 줄바꿈되지 않도록 구현
minjongbaek ade4fdb
feat: DetailBookGroupCard 컴포넌트의 뱃지 폰트 수정
minjongbaek b287ae8
feat: DefatilBookGroup 컴포넌트의 날짜 포맷 수정
minjongbaek 7325e9a
fix: SimpleBookGroupCard 컴포넌트 스타일을 디자인에 맞게 수정
minjongbaek a2705d2
feat: DetailBookGroupCard 컴포넌트 상, 하, 좌, 우 패딩 수정
minjongbaek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,88 @@ | ||
'use client'; | ||
|
||
import useMyGroupsQuery from '@/queries/group/useMyGroupQuery'; | ||
import BackButton from '@/v1/base/BackButton'; | ||
import TopNavigation from '@/v1/base/TopNavigation'; | ||
import DetailBookGroupCard from '@/v1/bookGroup/DetailBookGroupCard'; | ||
|
||
const UserGroupPage = () => { | ||
return '준비중입니다.'; | ||
return ( | ||
<> | ||
<TopNavigation> | ||
<TopNavigation.LeftItem> | ||
<BackButton /> | ||
</TopNavigation.LeftItem> | ||
<TopNavigation.CenterItem>내가 참여한 모임</TopNavigation.CenterItem> | ||
</TopNavigation> | ||
<UserGroupContent /> | ||
</> | ||
); | ||
}; | ||
|
||
const UserGroupContent = () => { | ||
const { data, isSuccess } = useMyGroupsQuery(); | ||
|
||
if (!isSuccess) { | ||
return ( | ||
<ul className="flex animate-pulse flex-col gap-[1rem] pt-[2rem]"> | ||
{Array.from({ length: 4 }).map((_, index) => ( | ||
<li | ||
key={index} | ||
className="border-placeholder px-[1.6rem] py-[0.9rem] shadow-[0_0_0.6rem_rgba(180,180,180,0.25)]" | ||
> | ||
<div className="flex gap-[0.5rem] [&>*]:rounded-[0.5rem]"> | ||
<div className="h-[1.9rem] w-[4.34rem] bg-placeholder" /> | ||
<div className="h-[1.9rem] w-[4.34rem] bg-placeholder" /> | ||
</div> | ||
|
||
<div className="flex justify-between gap-[1.5rem] pt-[1rem]"> | ||
<div className="flex flex-col justify-between [&>*]:rounded-[0.5rem]"> | ||
<div className="h-[2.15rem] w-[23rem] bg-placeholder" /> | ||
<div className="h-[2rem] w-[10rem] bg-placeholder" /> | ||
</div> | ||
<div className="h-[10.5rem] w-[7.5rem] rounded-[0.5rem] bg-placeholder" /> | ||
</div> | ||
</li> | ||
))} | ||
</ul> | ||
); | ||
} | ||
|
||
return ( | ||
<ul className="flex flex-col gap-[1rem] pt-[2rem]"> | ||
{data.bookGroups.map( | ||
({ | ||
title, | ||
introduce, | ||
book, | ||
startDate, | ||
endDate, | ||
owner, | ||
currentMemberCount, | ||
commentCount, | ||
isPublic, | ||
bookGroupId, | ||
}) => ( | ||
<li key={bookGroupId}> | ||
<DetailBookGroupCard | ||
title={title} | ||
description={introduce} | ||
bookImageSrc={book.imageUrl} | ||
date={{ start: startDate, end: endDate }} | ||
owner={{ | ||
name: owner.nickname, | ||
profileImageSrc: owner.profileUrl, | ||
}} | ||
memberCount={currentMemberCount} | ||
commentCount={commentCount} | ||
isPublic={isPublic} | ||
bookGroupId={bookGroupId} | ||
/> | ||
</li> | ||
) | ||
)} | ||
</ul> | ||
); | ||
}; | ||
|
||
export default UserGroupPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use client'; | ||
|
||
import { IconArrowLeft } from '@public/icons'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,14 @@ const DetailBookGroupCard = ({ | |
bookGroupId, | ||
}: DetailBookGroupCardProps) => { | ||
return ( | ||
<Link className="w-full" href={`/group/${bookGroupId}`}> | ||
<div className="min-h-[16.142rem] w-full rounded-[0.4rem] px-[1.6rem] py-[0.9rem] shadow-[0_0_0.6rem_rgba(180,180,180,0.25)]"> | ||
<div className="mb-[1rem] flex gap-[0.5rem]"> | ||
<Link href={`/group/${bookGroupId}`}> | ||
<div className="w-full rounded-[0.4rem] p-[1.5rem] shadow-[0_0_0.6rem_rgba(180,180,180,0.25)]"> | ||
<div className="flex gap-[0.5rem]"> | ||
<BookGroupStatus start={date.start} end={date.end} /> | ||
<Public isPublic={isPublic} /> | ||
</div> | ||
<div className="flex justify-between gap-[1.5rem]"> | ||
<div className="flex flex-grow flex-col gap-[0.63rem]"> | ||
<div className="flex justify-between gap-[1.5rem] pt-[1rem]"> | ||
<div className="flex flex-grow flex-col justify-between "> | ||
<Title title={title} /> | ||
<Description description={description} /> | ||
<Duration start={date.start} end={date.end} /> | ||
|
@@ -67,30 +67,29 @@ const Public = ({ isPublic }: { isPublic: boolean }) => ( | |
); | ||
|
||
const Title = ({ title }: { title: string }) => { | ||
return ( | ||
<div> | ||
<span className="text-md font-bold">{title}</span> | ||
</div> | ||
); | ||
return <div className="w-[22rem] truncate text-md font-bold">{title}</div>; | ||
}; | ||
|
||
const Description = ({ description }: { description: string }) => { | ||
return ( | ||
<div className="w-[22rem] truncate text-sm"> | ||
<span>{description}</span> | ||
</div> | ||
); | ||
return <div className="w-[22rem] truncate text-sm">{description}</div>; | ||
}; | ||
|
||
const Duration = ({ start, end }: { start: string; end: string }) => { | ||
const formatDateTime = (dateString: string) => | ||
new Intl.DateTimeFormat('ko-KR', { | ||
year: 'numeric', | ||
month: '2-digit', | ||
day: '2-digit', | ||
}).format(new Date(dateString)); | ||
Comment on lines
+79
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ask; w0w 저도 처음보는데 |
||
|
||
return ( | ||
<div className="flex items-center gap-[0.5rem]"> | ||
<div> | ||
<IconCalendar className="h-[1.161rem] w-[1.1rem] fill-placeholder" /> | ||
</div> | ||
<div className="text-xs text-placeholder"> | ||
<span className="pt-[0.1rem]"> | ||
{start} - {end} | ||
{formatDateTime(start)} - {formatDateTime(end)} | ||
</span> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오.. 😮 자바스크립트에
Intl
이라는 API도 있었군요! 👍🏻 다음에 저도 사용해봐야겠어요!