-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
๐จ Design: myprofile thunder / board swiper๋ก ๊ตฌํ
- Loading branch information
Showing
5 changed files
with
214 additions
and
120 deletions.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Link } from 'react-router-dom'; | ||
import BoardCard from '../../components/board/BoardCard.tsx'; | ||
|
||
interface BoardItem { | ||
uuid: string; | ||
category_name: string; | ||
title: string; | ||
content: string; | ||
hits: number; | ||
review_image_url: string; | ||
created_at: string; | ||
comment_count: number; | ||
} | ||
|
||
interface BoardListProps { | ||
boardItems: BoardItem[]; | ||
type: string; | ||
} | ||
|
||
const BoardList = ({ boardItems, type }: BoardListProps) => { | ||
return boardItems.length === 0 ? ( | ||
<div className="flex h-full w-full flex-col items-center justify-center py-8"> | ||
<p className="mt-10 text-[24px] text-[#666666] xs:text-[20px]">{`์ ํ๋ ๊ธ ๋ชฉ๋ก(${type})์ด ์์ด์`}</p> | ||
<img src="/images/CryingEgg.svg" className="inline-block h-[40vh]" alt="Crying Egg" /> | ||
{type === '์์ฑํ ๊ธ' && ( | ||
<Link | ||
to={'/board/boardpost'} | ||
className="flex h-[42px] w-[90%] items-center justify-center rounded-[8px] bg-primary font-bold text-white"> | ||
๊ฒ์๊ธ ๋ง๋ค๊ธฐ | ||
</Link> | ||
)} | ||
</div> | ||
) : ( | ||
boardItems.map((item) => ( | ||
<BoardCard | ||
key={item.uuid} | ||
id={item.uuid} | ||
category={item.category_name} | ||
title={item.title} | ||
content={item.content} | ||
hits={item.hits} | ||
review_image_url={item.review_image_url} | ||
createdAt={item.created_at} | ||
commentLength={item.comment_count} | ||
/> | ||
)) | ||
); | ||
}; | ||
|
||
export default BoardList; |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Link } from 'react-router-dom'; | ||
import ThunderCard from '../../components/thunder/ThunderCard'; | ||
|
||
interface ThunderItem { | ||
uuid: string; | ||
title: string; | ||
payment_method_name: string; | ||
age_group_name: string; | ||
gender_group_name: string; | ||
meeting_time: string; | ||
meeting_image_url: string; | ||
description: string; | ||
} | ||
|
||
interface ThunderListProps { | ||
thunderItems: ThunderItem[]; | ||
type: string; | ||
} | ||
|
||
const ThunderList = ({ thunderItems, type }: ThunderListProps) => { | ||
return thunderItems.length === 0 ? ( | ||
<div className="flex h-full w-full flex-col items-center justify-center py-8"> | ||
<p className="mt-10 text-[24px] text-[#666666] xs:text-[20px]">{`์ ํ๋ ๊ธ ๋ชฉ๋ก(${type})์ด ์์ด์`}</p> | ||
<img src="/images/CryingEgg.svg" className="inline-block h-[40vh]" alt="Crying Egg" /> | ||
{type === '์์ฑํ ๊ธ' && ( | ||
<Link | ||
to={'/thunder/thunderpost'} | ||
className="flex h-[42px] w-[90%] items-center justify-center rounded-[8px] bg-primary font-bold text-white"> | ||
๊ฒ์๊ธ ๋ง๋ค๊ธฐ | ||
</Link> | ||
)} | ||
</div> | ||
) : ( | ||
thunderItems.map((item) => ( | ||
<ThunderCard | ||
key={item.uuid} | ||
id={item.uuid} | ||
meeting_image_url={item.meeting_image_url} | ||
description={item.description} | ||
paymentMethod={item.payment_method_name} | ||
appointmentTime={item.meeting_time} | ||
title={item.title} | ||
genderGroup={item.gender_group_name} | ||
ageGroup={item.age_group_name} | ||
/> | ||
)) | ||
); | ||
}; | ||
|
||
export default ThunderList; |
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
Oops, something went wrong.