|
1 | 1 | import { Typography } from '@zicdding-web/ui/Typography';
|
2 |
| -import OrderByTabs from './_components/OrderByTabs'; |
3 |
| -import ClassCard from './_components/ClassCard'; |
4 | 2 | import Link from 'next/link';
|
| 3 | +import ClassCard from './_components/ClassCard'; |
| 4 | + |
5 | 5 | const dummy = [
|
6 | 6 | {
|
7 | 7 | id: '1',
|
@@ -48,43 +48,87 @@ const dummy = [
|
48 | 48 | ],
|
49 | 49 | myLike: false,
|
50 | 50 | },
|
| 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 | + }, |
51 | 96 | ];
|
52 | 97 |
|
53 | 98 | export default function Home() {
|
54 | 99 | 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> |
64 | 107 | </div>
|
65 | 108 |
|
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" /> |
70 | 114 | </Link>
|
71 | 115 | ))}
|
72 |
| - </div> |
73 |
| - </div> |
| 116 | + </ul> |
| 117 | + </section> |
74 | 118 |
|
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> |
78 | 125 | </div>
|
79 | 126 |
|
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> |
88 | 132 | </div>
|
89 | 133 | );
|
90 | 134 | }
|
0 commit comments