diff --git a/src/pages/course-planner/foundation.tsx b/src/pages/course-planner/foundation.tsx index f71548cc..28aaed8a 100644 --- a/src/pages/course-planner/foundation.tsx +++ b/src/pages/course-planner/foundation.tsx @@ -101,7 +101,7 @@ const Foundation = () => { ) : ( { {!selectedCardId ? ( cardData.map((card) => ( { useEffect(() => { const fetchData = async () => { - // Simulate data fetching setTimeout(() => { const foundCard = cardData.find((c) => c.id === cardId); setCard(foundCard); @@ -130,94 +128,79 @@ const StateDetails = () => { - {card.boards.map( - ( - board: - | string - | number - | bigint - | boolean - | React.ReactElement< - any, - string | React.JSXElementConstructor - > - | Iterable - | Promise - | null - | undefined, - index: React.Key | null | undefined - ) => ( - ( + { + if (typeof board === "string") { + handleBoardClick(board); + } + }} + > + { - if (typeof board === "string") { - handleBoardClick(board); - } + > + + + {board} + + + - - - - {board} - + + - + {card.boardsUploaded} / {card.totalBoards}{" "} + {t("COURSE_PLANNER.SUBJECTS_UPLOADED")} + + + + - - - ) - )} + + + + + ))}{" "} );