File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const Page = () => {
2323 error : planError ,
2424 toggle,
2525 progressText,
26+ total,
2627 } = useTodayPlanItems ( currentUser ?. uid ) ;
2728
2829 // 사용자가 존재하면 데이터 불러옴
@@ -82,6 +83,7 @@ const Page = () => {
8283 loading = { planLoading }
8384 error = { planError }
8485 onToggle = { toggle }
86+ todoTotal = { total }
8587 />
8688
8789 { /* 3. ButtonSection */ }
Original file line number Diff line number Diff line change 33import TodayPlanContainer from './TodayPlanContainer' ;
44import UpcomingPlanContainer from '@/components/home/UpcomingPlanContainer' ;
55import type { PlanItem } from '@/services/plans/planManageService.service' ;
6- import { useTodayPlanItems } from '@/hooks/useTodayPlanItems' ;
76import { useUpcomingPlanItems } from '@/hooks/useUpcomingPlanItems' ;
87
98interface BottomSectionProps {
@@ -13,6 +12,7 @@ interface BottomSectionProps {
1312 loading : boolean ;
1413 error : string | null ;
1514 onToggle : ( id : string , checked : boolean ) => void ;
15+ todoTotal : number ;
1616}
1717
1818export default function BottomSection ( {
@@ -22,8 +22,8 @@ export default function BottomSection({
2222 loading,
2323 error,
2424 onToggle,
25+ todoTotal,
2526} : BottomSectionProps ) {
26- const today = useTodayPlanItems ( uid ) ;
2727 const upcoming = useUpcomingPlanItems ( uid ) ;
2828
2929 return (
@@ -41,7 +41,7 @@ export default function BottomSection({
4141 items = { upcoming . items }
4242 loading = { upcoming . loading }
4343 error = { upcoming . error }
44- limit = { today . total }
44+ limit = { todoTotal }
4545 />
4646 </ div >
4747 ) ;
You can’t perform that action at this time.
0 commit comments