1- import { BookOpen , User , Calendar , Clock } from "lucide-react" ;
21import BadgeLeader from "~/components/BadgeLeader" ;
32import { useQuery } from "@tanstack/react-query" ;
43import TeamApi from "~/api-requests/team.requests" ;
54import Loading from "~/components/Loading" ;
5+ import TopicTeam from "./InfoTeam" ;
6+ import InfoPresent from "./InfoPresent" ;
7+ import Notification from "./Notification" ;
68
79const TeamPage = ( ) => {
810 const { data : teams , isLoading } = useQuery ( {
@@ -12,17 +14,18 @@ const TeamPage = () => {
1214 return res . result ;
1315 } ,
1416 } ) ;
15- if ( isLoading ) < Loading /> ;
17+ if ( isLoading ) return < Loading /> ;
1618
1719 return (
1820 < >
1921 < section className = "mb-6 sm:mb-8" >
2022 < h1 className = "text-2xl font-bold tracking-tight text-gray-900 sm:text-3xl" > Danh sách các nhóm</ h1 >
2123 < p className = "mt-2 text-sm text-gray-600" >
22- Xem thông tin các nhóm tham gia Challenge vòng 3. Tổng cộng:{ " " }
24+ Danh sách thông tin các nhóm tham gia Challenge 3. Tổng cộng:{ " " }
2325 < span className = "text-primary font-semibold" > { teams ?. length || 0 } </ span > nhóm
2426 </ p >
2527 </ section >
28+ < Notification />
2629
2730 < section className = "space-y-8" >
2831 { teams ?. map ( ( team , index ) => (
@@ -98,92 +101,8 @@ const TeamPage = () => {
98101 </ div >
99102
100103 < div className = "col-span-1 space-y-2 lg:col-span-4" >
101- < div className = "overflow-hidden rounded-lg border border-gray-200/70 bg-white shadow-xs transition-all" >
102- < div className = "border-b border-gray-200/70 bg-gradient-to-br from-gray-50/80 to-white px-5 py-4" >
103- < h3 className = "flex items-center gap-2 text-sm font-semibold text-gray-900" >
104- < BookOpen className = "text-primary h-4 w-4" />
105- Thông tin nhóm
106- </ h3 >
107- </ div >
108- < div className = "space-y-3 px-5 py-4" >
109- < div className = "flex items-start gap-3" >
110- < div className = "bg-primary/10 text-primary flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg" >
111- < BookOpen className = "h-4 w-4" />
112- </ div >
113- < div className = "flex-1" >
114- < p className = "text-xs font-medium text-gray-500" > Đề tài</ p >
115- < p className = "text-primary mt-0.5 text-sm leading-relaxed font-semibold" >
116- { team . topic ?. title || "Chưa có đề tài" }
117- </ p >
118- { team . topic ?. filePath && (
119- < a
120- href = { team . topic . filePath }
121- target = "_blank"
122- rel = "noopener noreferrer"
123- className = "text-primary mt-1 inline-block text-xs font-medium hover:underline"
124- >
125- Xem chi tiết đề tài →
126- </ a >
127- ) }
128- </ div >
129- </ div >
130- < div className = "flex items-start gap-3" >
131- < div className = "bg-primary/10 text-primary flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg" >
132- < User className = "h-4 w-4" />
133- </ div >
134- < div className = "flex-1" >
135- < p className = "text-xs font-medium text-gray-500" > Mentor</ p >
136- < p className = "text-primary mt-0.5 text-sm font-semibold" >
137- { team . mentorship ?. mentor ?. fullName || "Chưa có mentor" }
138- </ p >
139- </ div >
140- </ div >
141- </ div >
142- </ div >
143-
144- < div className = "overflow-hidden rounded-lg border border-amber-200/60 bg-gradient-to-br from-amber-50/50 to-white shadow-xs transition-all" >
145- < div className = "border-b border-amber-200/60 bg-gradient-to-br from-amber-50/80 to-white px-5 py-4" >
146- < h3 className = "flex items-center gap-2 text-sm font-semibold text-gray-900" >
147- < Calendar className = "h-4 w-4 text-amber-600" />
148- Lịch thuyết trình
149- </ h3 >
150- </ div >
151- < div className = "space-y-3 px-5 py-4" >
152- < div className = "flex items-start gap-3" >
153- < div className = "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-amber-100/50 text-amber-600" >
154- < Calendar className = "h-4 w-4" />
155- </ div >
156- < div className = "flex-1" >
157- < p className = "text-xs font-medium text-gray-500" > Ngày</ p >
158- < p className = "mt-0.5 text-xs font-semibold text-gray-900 italic" >
159- Chưa mở
160- </ p >
161- </ div >
162- </ div >
163- < div className = "flex items-start gap-3" >
164- < div className = "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-amber-100/50 text-amber-600" >
165- < Clock className = "h-4 w-4" />
166- </ div >
167- < div className = "flex-1" >
168- < p className = "text-xs font-medium text-gray-500" > Giờ</ p >
169- < p className = "mt-0.5 text-xs font-semibold text-gray-900 italic" >
170- Chưa mở
171- </ p >
172- </ div >
173- </ div >
174- < div className = "flex items-start gap-3" >
175- < div className = "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-amber-100/50 text-amber-600" >
176- < BookOpen className = "h-4 w-4" />
177- </ div >
178- < div className = "flex-1" >
179- < p className = "text-xs font-medium text-gray-500" > Địa điểm</ p >
180- < p className = "mt-0.5 text-xs font-semibold text-gray-900 italic" >
181- Chưa mở
182- </ p >
183- </ div >
184- </ div >
185- </ div >
186- </ div >
104+ < TopicTeam team = { team } />
105+ < InfoPresent team = { team } />
187106 </ div >
188107 </ div >
189108 </ >
0 commit comments