File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export { default as SellerProfilePage } from './ui/SellerProfilePage' ;
Original file line number Diff line number Diff line change 1+ import { MOCK_SELLER_PRODUCTS } from '@shared/mocks/data' ;
2+ import { Card } from '@shared/ui/Card' ;
3+ import { chunkArray } from '@shared/utils' ;
4+
5+ const SellerProfilePage = ( ) => {
6+ const productRows = chunkArray ( MOCK_SELLER_PRODUCTS , 4 ) ;
7+
8+ return (
9+ < main className = "mx-auto flex w-full max-w-[1200px] flex-col items-start gap-[93px] px-4 md:px-0" >
10+ < section className = "flex flex-col items-start justify-center gap-[30px] self-stretch" >
11+ < div className = "flex w-[184px] items-center gap-[23px]" >
12+ < img src = "/profile.jpg" alt = "판매자 프로필" className = "h-20 w-20 shrink-0 rounded-full object-cover" />
13+ < span className = "typo-title-3 text-gray-900" > 김애옹</ span >
14+ </ div >
15+ </ section >
16+
17+ < section className = "flex flex-col items-start gap-[36px] self-stretch" >
18+ < h2 className = "typo-title-1 self-stretch text-gray-900" > 김애옹님의 판매목록</ h2 >
19+
20+ { /* Mobile */ }
21+ < div className = "flex w-full gap-[22px] overflow-x-auto md:hidden" >
22+ { MOCK_SELLER_PRODUCTS . map ( ( product ) => (
23+ < Card
24+ key = { product . id }
25+ image = { product . image }
26+ title = { product . title }
27+ price = { product . price }
28+ date = { product . date }
29+ />
30+ ) ) }
31+ </ div >
32+
33+ { /* Desktop */ }
34+ { productRows . map ( ( row , rowIndex ) => (
35+ < div key = { rowIndex } className = "hidden h-[412px] items-center gap-[22px] self-stretch md:flex" >
36+ { row . map ( ( product ) => (
37+ < Card
38+ key = { product . id }
39+ image = { product . image }
40+ title = { product . title }
41+ price = { product . price }
42+ date = { product . date }
43+ />
44+ ) ) }
45+ </ div >
46+ ) ) }
47+ </ section >
48+ </ main >
49+ ) ;
50+ } ;
51+
52+ export default SellerProfilePage ;
You can’t perform that action at this time.
0 commit comments