22import { useRouter } from 'next/navigation' ;
33
44import { Button } from '@components' ;
5- import { IcCalendar } from '@svg' ;
5+ import { IcCalendar , IcQuestionWhite } from '@svg' ;
66import { trackEvent } from '@utils' ;
77import { HomeHeader , NoticeButton , ProblemSwiper , WeekProgress } from '@/components/home' ;
8+ import { useGetWeeklyPublish } from '@/apis/controller/home' ;
89const Page = ( ) => {
910 const router = useRouter ( ) ;
11+ const { data, isLoading } = useGetWeeklyPublish ( ) ;
12+ const problemSets = data ?. data ?? [ ] ;
1013
1114 const handleClickAllProblem = ( ) => {
1215 trackEvent ( 'home_all_problem_button_click' ) ;
@@ -31,21 +34,22 @@ const Page = () => {
3134 </ div >
3235 </ main >
3336 < div className = 'mt-[2.4rem]' >
34- { /* { isLoading ? (
37+ { isLoading ? (
3538 < div className = 'h-[456px] w-full' />
3639 ) : problemSets ? (
3740 < ProblemSwiper problemSets = { problemSets } />
3841 ) : (
3942 < > </ >
40- )} */ }
43+ ) }
4144 </ div >
42- < footer className = 'bg-background mt-[2.4rem] flex flex-col gap-[1rem] px-[2rem] pb-[3.3rem]' >
45+
46+ < footer className = 'bg-background flex flex-col gap-[1rem] px-[2rem] pb-[3.3rem]' >
4347 < Button variant = 'light' onClick = { handleClickAllProblem } >
4448 < IcCalendar width = { 24 } height = { 24 } />
4549 날짜별로 보기
4650 </ Button >
4751 < Button variant = 'blue' onClick = { handleClickQnA } >
48- < IcCalendar width = { 24 } height = { 24 } />
52+ < IcQuestionWhite width = { 24 } height = { 24 } />
4953 QnA 바로가기
5054 </ Button >
5155 </ footer >
0 commit comments