From 0a2ae3c02abd5bd86628b523241d440e748e9526 Mon Sep 17 00:00:00 2001 From: rahul_g Date: Fri, 26 Jul 2024 16:57:42 +0530 Subject: [PATCH] responsive ui --- src/pages/course-planner/foundation.tsx | 4 +- src/pages/stateDetails.tsx | 147 +++++++++++------------- 2 files changed, 67 insertions(+), 84 deletions(-) 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")} + + + + - - - ) - )} + + + + + ))}{" "} );