Skip to content

Commit e966b44

Browse files
authored
feat: 메인 페이지 UI 구현 (#54)
1 parent 520654d commit e966b44

File tree

1 file changed

+72
-28
lines changed

1 file changed

+72
-28
lines changed

frontend/zicdding-class.com/app/page.tsx

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Typography } from '@zicdding-web/ui/Typography';
2-
import OrderByTabs from './_components/OrderByTabs';
3-
import ClassCard from './_components/ClassCard';
42
import Link from 'next/link';
3+
import ClassCard from './_components/ClassCard';
4+
55
const dummy = [
66
{
77
id: '1',
@@ -48,43 +48,87 @@ const dummy = [
4848
],
4949
myLike: false,
5050
},
51+
{
52+
id: '4',
53+
title: 'Example Class Title',
54+
endDate: '2024-07-01',
55+
positions: ['프론트엔드', '백엔드'],
56+
nickname: '직띵',
57+
likeCnt: 10,
58+
viewCnt: 20,
59+
commentCnt: 5,
60+
technology: [
61+
{ name: 'react', imgUrl: '/next.svg' },
62+
{ name: 'js', imgUrl: '/vercel.svg' },
63+
],
64+
myLike: false,
65+
},
66+
{
67+
id: '5',
68+
title: 'Example Class Title',
69+
endDate: '2024-07-01',
70+
positions: ['프론트엔드', '백엔드'],
71+
nickname: '직띵',
72+
likeCnt: 10,
73+
viewCnt: 20,
74+
commentCnt: 5,
75+
technology: [
76+
{ name: 'react', imgUrl: '/next.svg' },
77+
{ name: 'js', imgUrl: '/vercel.svg' },
78+
],
79+
myLike: false,
80+
},
81+
{
82+
id: '6',
83+
title: 'Example Class Title',
84+
endDate: '2024-07-01',
85+
positions: ['프론트엔드', '백엔드'],
86+
nickname: '직띵',
87+
likeCnt: 10,
88+
viewCnt: 20,
89+
commentCnt: 5,
90+
technology: [
91+
{ name: 'react', imgUrl: '/next.svg' },
92+
{ name: 'js', imgUrl: '/vercel.svg' },
93+
],
94+
myLike: false,
95+
},
5196
];
5297

5398
export default function Home() {
5499
return (
55-
<div className="px-6 ">
56-
<div className="mb-20">
57-
<div className="flex justify-between border-b-[1px] border-gray-200 pb-4">
58-
<Typography variant="h2">클래스</Typography>
59-
60-
<div className="flex items-center gap-4">
61-
<OrderByTabs />
62-
<Typography variant="body">더보기</Typography>
63-
</div>
100+
<div className="flex flex-col px-6 gap-[52px] mb-28">
101+
<section className="">
102+
<div className="flex justify-between items-center border-b-[1px] border-[#C6C6C6] py-4">
103+
<Typography variant="h2" className="text-[#0F172A]">
104+
클래스
105+
</Typography>
106+
<Link href="/class">더보기</Link>
64107
</div>
65108

66-
<div className="flex gap-4 pt-6 overflow-x-auto">
67-
{dummy.map((item) => (
68-
<Link href={`/class/${item.id}`} key={`${item.id}`}>
69-
<ClassCard {...item} />
109+
{/* GYU-TODO: ClassList 로 추출해도 될듯 */}
110+
<ul className="flex flex-wrap gap-8 w-full mt-7">
111+
{dummy.slice(0, 6).map((item) => (
112+
<Link href={`/class/${item.id}`} key={`${item.id}`} className="w-[calc(34%-32px)]">
113+
<ClassCard {...item} className="w-full" />
70114
</Link>
71115
))}
72-
</div>
73-
</div>
116+
</ul>
117+
</section>
74118

75-
<div>
76-
<div className="flex justify-between border-b-[1px] border-gray-200 pb-4">
77-
<Typography variant="h2">ITNews</Typography>
119+
<section>
120+
<div className="flex justify-between items-center border-b-[1px] border-[#C6C6C6] py-4">
121+
<Typography variant="h2" className="text-[#0F172A]">
122+
IT News
123+
</Typography>
124+
<Link href="#">더보기</Link>
78125
</div>
79126

80-
<div className="flex gap-4 pt-6 overflow-x-auto">
81-
{dummy.map((item) => (
82-
<Link href={`/class/${item.id}`} key={`${item.id}`}>
83-
<ClassCard key={item.id} {...item} />
84-
</Link>
85-
))}
86-
</div>
87-
</div>
127+
<ul className="flex flex-wrap gap-8 w-full mt-7">
128+
{/* TODO: IT news 카드 컴포넌트 재사용 */}
129+
<Typography variant="body">데이터가 존재하지 않습니다.</Typography>
130+
</ul>
131+
</section>
88132
</div>
89133
);
90134
}

0 commit comments

Comments
 (0)